cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [23/35] git commit: updated refs/heads/master to 8bc0294
Date Mon, 31 Aug 2015 06:01:43 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java
index 8a9d0f5..d4d3c8d 100644
--- a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java
+++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java
@@ -32,6 +32,7 @@ import javax.persistence.EntityExistsException;
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
 import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice;
+import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
@@ -136,6 +137,7 @@ import com.cloud.vm.VirtualMachineProfile;
 @Local(value = NetworkElement.class)
 public class CiscoVnmcElement extends AdapterBase implements SourceNatServiceProvider, FirewallServiceProvider, PortForwardingServiceProvider, IpDeployer,
         StaticNatServiceProvider, ResourceStateAdapter, NetworkElement, CiscoVnmcElementService, CiscoAsa1000vService {
+    private static final Logger s_logger = Logger.getLogger(CiscoVnmcElement.class);
     private static final Map<Service, Map<Capability, String>> capabilities = setCapabilities();
 
     @Inject
@@ -272,7 +274,7 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
         final DataCenter zone = _entityMgr.findById(DataCenter.class, network.getDataCenterId());
 
         if (zone.getNetworkType() == NetworkType.Basic) {
-            logger.debug("Not handling network implement in zone of type " + NetworkType.Basic);
+            s_logger.debug("Not handling network implement in zone of type " + NetworkType.Basic);
             return false;
         }
 
@@ -282,24 +284,24 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
 
         final List<CiscoVnmcControllerVO> devices = _ciscoVnmcDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            logger.error("No Cisco Vnmc device on network " + network.getName());
+            s_logger.error("No Cisco Vnmc device on network " + network.getName());
             return false;
         }
 
         List<CiscoAsa1000vDeviceVO> asaList = _ciscoAsa1000vDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (asaList.isEmpty()) {
-            logger.debug("No Cisco ASA 1000v device on network " + network.getName());
+            s_logger.debug("No Cisco ASA 1000v device on network " + network.getName());
             return false;
         }
 
         NetworkAsa1000vMapVO asaForNetwork = _networkAsa1000vMapDao.findByNetworkId(network.getId());
         if (asaForNetwork != null) {
-            logger.debug("Cisco ASA 1000v device already associated with network " + network.getName());
+            s_logger.debug("Cisco ASA 1000v device already associated with network " + network.getName());
             return true;
         }
 
         if (!_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.SourceNat, Provider.CiscoVnmc)) {
-            logger.error("SourceNat service is not provided by Cisco Vnmc device on network " + network.getName());
+            s_logger.error("SourceNat service is not provided by Cisco Vnmc device on network " + network.getName());
             return false;
         }
 
@@ -307,20 +309,20 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
             // ensure that there is an ASA 1000v assigned to this network
             CiscoAsa1000vDevice assignedAsa = assignAsa1000vToNetwork(network);
             if (assignedAsa == null) {
-                logger.error("Unable to assign ASA 1000v device to network " + network.getName());
+                s_logger.error("Unable to assign ASA 1000v device to network " + network.getName());
                 throw new CloudRuntimeException("Unable to assign ASA 1000v device to network " + network.getName());
             }
 
             ClusterVO asaCluster = _clusterDao.findById(assignedAsa.getClusterId());
             ClusterVSMMapVO clusterVsmMap = _clusterVsmMapDao.findByClusterId(assignedAsa.getClusterId());
             if (clusterVsmMap == null) {
-                logger.error("Vmware cluster " + asaCluster.getName() + " has no Cisco Nexus VSM device associated with it");
+                s_logger.error("Vmware cluster " + asaCluster.getName() + " has no Cisco Nexus VSM device associated with it");
                 throw new CloudRuntimeException("Vmware cluster " + asaCluster.getName() + " has no Cisco Nexus VSM device associated with it");
             }
 
             CiscoNexusVSMDeviceVO vsmDevice = _vsmDeviceDao.findById(clusterVsmMap.getVsmId());
             if (vsmDevice == null) {
-                logger.error("Unable to load details of Cisco Nexus VSM device associated with cluster " + asaCluster.getName());
+                s_logger.error("Unable to load details of Cisco Nexus VSM device associated with cluster " + asaCluster.getName());
                 throw new CloudRuntimeException("Unable to load details of Cisco Nexus VSM device associated with cluster " + asaCluster.getName());
             }
 
@@ -355,14 +357,14 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
                     long callerUserId = CallContext.current().getCallingUserId();
                     outsideIp = _ipAddrMgr.allocateIp(owner, false, caller, callerUserId, zone, true);
                 } catch (ResourceAllocationException e) {
-                    logger.error("Unable to allocate additional public Ip address. Exception details " + e);
+                    s_logger.error("Unable to allocate additional public Ip address. Exception details " + e);
                     throw new CloudRuntimeException("Unable to allocate additional public Ip address. Exception details " + e);
                 }
 
                 try {
                     outsideIp = _ipAddrMgr.associateIPToGuestNetwork(outsideIp.getId(), network.getId(), true);
                 } catch (ResourceAllocationException e) {
-                    logger.error("Unable to assign allocated additional public Ip " + outsideIp.getAddress().addr() + " to network with vlan " + vlanId +
+                    s_logger.error("Unable to assign allocated additional public Ip " + outsideIp.getAddress().addr() + " to network with vlan " + vlanId +
                         ". Exception details " + e);
                     throw new CloudRuntimeException("Unable to assign allocated additional public Ip " + outsideIp.getAddress().addr() + " to network with vlan " +
                         vlanId + ". Exception details " + e);
@@ -375,33 +377,33 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
             // all public ip addresses must be from same subnet, this essentially means single public subnet in zone
             if (!createLogicalEdgeFirewall(vlanId, network.getGateway(), gatewayNetmask, outsideIp.getAddress().addr(), sourceNatIp.getNetmask(), publicGateways,
                 ciscoVnmcHost.getId())) {
-                logger.error("Failed to create logical edge firewall in Cisco VNMC device for network " + network.getName());
+                s_logger.error("Failed to create logical edge firewall in Cisco VNMC device for network " + network.getName());
                 throw new CloudRuntimeException("Failed to create logical edge firewall in Cisco VNMC device for network " + network.getName());
             }
 
             // create stuff in VSM for ASA device
             if (!configureNexusVsmForAsa(vlanId, network.getGateway(), vsmDevice.getUserName(), vsmDevice.getPassword(), vsmDevice.getipaddr(),
                 assignedAsa.getInPortProfile(), ciscoVnmcHost.getId())) {
-                logger.error("Failed to configure Cisco Nexus VSM " + vsmDevice.getipaddr() + " for ASA device for network " + network.getName());
+                s_logger.error("Failed to configure Cisco Nexus VSM " + vsmDevice.getipaddr() + " for ASA device for network " + network.getName());
                 throw new CloudRuntimeException("Failed to configure Cisco Nexus VSM " + vsmDevice.getipaddr() + " for ASA device for network " + network.getName());
             }
 
             // configure source NAT
             if (!configureSourceNat(vlanId, network.getCidr(), sourceNatIp, ciscoVnmcHost.getId())) {
-                logger.error("Failed to configure source NAT in Cisco VNMC device for network " + network.getName());
+                s_logger.error("Failed to configure source NAT in Cisco VNMC device for network " + network.getName());
                 throw new CloudRuntimeException("Failed to configure source NAT in Cisco VNMC device for network " + network.getName());
             }
 
             // associate Asa 1000v instance with logical edge firewall
             if (!associateAsaWithLogicalEdgeFirewall(vlanId, assignedAsa.getManagementIp(), ciscoVnmcHost.getId())) {
-                logger.error("Failed to associate Cisco ASA 1000v (" + assignedAsa.getManagementIp() + ") with logical edge firewall in VNMC for network " +
+                s_logger.error("Failed to associate Cisco ASA 1000v (" + assignedAsa.getManagementIp() + ") with logical edge firewall in VNMC for network " +
                     network.getName());
                 throw new CloudRuntimeException("Failed to associate Cisco ASA 1000v (" + assignedAsa.getManagementIp() +
                     ") with logical edge firewall in VNMC for network " + network.getName());
             }
         } catch (CloudRuntimeException e) {
             unassignAsa1000vFromNetwork(network);
-            logger.error("CiscoVnmcElement failed", e);
+            s_logger.error("CiscoVnmcElement failed", e);
             return false;
         } catch (Exception e) {
             unassignAsa1000vFromNetwork(network);
@@ -477,7 +479,7 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
     @Override
     public boolean verifyServicesCombination(Set<Service> services) {
         if (!services.contains(Service.Firewall)) {
-            logger.warn("CiscoVnmc must be used as Firewall Service Provider in the network");
+            s_logger.warn("CiscoVnmc must be used as Firewall Service Provider in the network");
             return false;
         }
         return true;
@@ -642,26 +644,26 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
     public boolean applyFWRules(Network network, List<? extends FirewallRule> rules) throws ResourceUnavailableException {
 
         if (!_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Firewall, Provider.CiscoVnmc)) {
-            logger.error("Firewall service is not provided by Cisco Vnmc device on network " + network.getName());
+            s_logger.error("Firewall service is not provided by Cisco Vnmc device on network " + network.getName());
             return false;
         }
 
         // Find VNMC host for physical network
         List<CiscoVnmcControllerVO> devices = _ciscoVnmcDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            logger.error("No Cisco Vnmc device on network " + network.getName());
+            s_logger.error("No Cisco Vnmc device on network " + network.getName());
             return true;
         }
 
         // Find if ASA 1000v is associated with network
         NetworkAsa1000vMapVO asaForNetwork = _networkAsa1000vMapDao.findByNetworkId(network.getId());
         if (asaForNetwork == null) {
-            logger.debug("Cisco ASA 1000v device is not associated with network " + network.getName());
+            s_logger.debug("Cisco ASA 1000v device is not associated with network " + network.getName());
             return true;
         }
 
         if (network.getState() == Network.State.Allocated) {
-            logger.debug("External firewall was asked to apply firewall rules for network with ID " + network.getId() +
+            s_logger.debug("External firewall was asked to apply firewall rules for network with ID " + network.getId() +
                 "; this network is not implemented. Skipping backend commands.");
             return true;
         }
@@ -688,7 +690,7 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
             if (answer == null || !answer.getResult()) {
                 String details = (answer != null) ? answer.getDetails() : "details unavailable";
                 String msg = "Unable to apply firewall rules to Cisco ASA 1000v appliance due to: " + details + ".";
-                logger.error(msg);
+                s_logger.error(msg);
                 throw new ResourceUnavailableException(msg, DataCenter.class, network.getDataCenterId());
             }
         }
@@ -700,26 +702,26 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
     public boolean applyPFRules(Network network, List<PortForwardingRule> rules) throws ResourceUnavailableException {
 
         if (!_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.PortForwarding, Provider.CiscoVnmc)) {
-            logger.error("Port forwarding service is not provided by Cisco Vnmc device on network " + network.getName());
+            s_logger.error("Port forwarding service is not provided by Cisco Vnmc device on network " + network.getName());
             return false;
         }
 
         // Find VNMC host for physical network
         List<CiscoVnmcControllerVO> devices = _ciscoVnmcDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            logger.error("No Cisco Vnmc device on network " + network.getName());
+            s_logger.error("No Cisco Vnmc device on network " + network.getName());
             return true;
         }
 
         // Find if ASA 1000v is associated with network
         NetworkAsa1000vMapVO asaForNetwork = _networkAsa1000vMapDao.findByNetworkId(network.getId());
         if (asaForNetwork == null) {
-            logger.debug("Cisco ASA 1000v device is not associated with network " + network.getName());
+            s_logger.debug("Cisco ASA 1000v device is not associated with network " + network.getName());
             return true;
         }
 
         if (network.getState() == Network.State.Allocated) {
-            logger.debug("External firewall was asked to apply port forwarding rules for network with ID " + network.getId() +
+            s_logger.debug("External firewall was asked to apply port forwarding rules for network with ID " + network.getId() +
                 "; this network is not implemented. Skipping backend commands.");
             return true;
         }
@@ -743,7 +745,7 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
             if (answer == null || !answer.getResult()) {
                 String details = (answer != null) ? answer.getDetails() : "details unavailable";
                 String msg = "Unable to apply port forwarding rules to Cisco ASA 1000v appliance due to: " + details + ".";
-                logger.error(msg);
+                s_logger.error(msg);
                 throw new ResourceUnavailableException(msg, DataCenter.class, network.getDataCenterId());
             }
         }
@@ -754,26 +756,26 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
     @Override
     public boolean applyStaticNats(Network network, List<? extends StaticNat> rules) throws ResourceUnavailableException {
         if (!_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.StaticNat, Provider.CiscoVnmc)) {
-            logger.error("Static NAT service is not provided by Cisco Vnmc device on network " + network.getName());
+            s_logger.error("Static NAT service is not provided by Cisco Vnmc device on network " + network.getName());
             return false;
         }
 
         // Find VNMC host for physical network
         List<CiscoVnmcControllerVO> devices = _ciscoVnmcDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
         if (devices.isEmpty()) {
-            logger.error("No Cisco Vnmc device on network " + network.getName());
+            s_logger.error("No Cisco Vnmc device on network " + network.getName());
             return true;
         }
 
         // Find if ASA 1000v is associated with network
         NetworkAsa1000vMapVO asaForNetwork = _networkAsa1000vMapDao.findByNetworkId(network.getId());
         if (asaForNetwork == null) {
-            logger.debug("Cisco ASA 1000v device is not associated with network " + network.getName());
+            s_logger.debug("Cisco ASA 1000v device is not associated with network " + network.getName());
             return true;
         }
 
         if (network.getState() == Network.State.Allocated) {
-            logger.debug("External firewall was asked to apply static NAT rules for network with ID " + network.getId() +
+            s_logger.debug("External firewall was asked to apply static NAT rules for network with ID " + network.getId() +
                 "; this network is not implemented. Skipping backend commands.");
             return true;
         }
@@ -798,7 +800,7 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
             if (answer == null || !answer.getResult()) {
                 String details = (answer != null) ? answer.getDetails() : "details unavailable";
                 String msg = "Unable to apply static NAT rules to Cisco ASA 1000v appliance due to: " + details + ".";
-                logger.error(msg);
+                s_logger.error(msg);
                 throw new ResourceUnavailableException(msg, DataCenter.class, network.getDataCenterId());
             }
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/element/ElasticLoadBalancerElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/element/ElasticLoadBalancerElement.java b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/element/ElasticLoadBalancerElement.java
index ed94003..1d92d07 100644
--- a/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/element/ElasticLoadBalancerElement.java
+++ b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/element/ElasticLoadBalancerElement.java
@@ -25,6 +25,7 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
@@ -57,6 +58,7 @@ import com.cloud.vm.VirtualMachineProfile;
 @Component
 @Local(value = NetworkElement.class)
 public class ElasticLoadBalancerElement extends AdapterBase implements LoadBalancingServiceProvider, IpDeployer {
+    private static final Logger s_logger = Logger.getLogger(ElasticLoadBalancerElement.class);
     private static final Map<Service, Map<Capability, String>> capabilities = setCapabilities();
     @Inject
     NetworkModel _networkManager;
@@ -74,7 +76,7 @@ public class ElasticLoadBalancerElement extends AdapterBase implements LoadBalan
 
     private boolean canHandle(Network network, List<LoadBalancingRule> rules) {
         if (network.getGuestType() != Network.GuestType.Shared || network.getTrafficType() != TrafficType.Guest) {
-            logger.debug("Not handling network with type  " + network.getGuestType() + " and traffic type " + network.getTrafficType());
+            s_logger.debug("Not handling network with type  " + network.getGuestType() + " and traffic type " + network.getTrafficType());
             return false;
         }
 
@@ -84,7 +86,7 @@ public class ElasticLoadBalancerElement extends AdapterBase implements LoadBalan
             if (schemeCaps != null) {
                 for (LoadBalancingRule rule : rules) {
                     if (!schemeCaps.contains(rule.getScheme().toString())) {
-                        logger.debug("Scheme " + rules.get(0).getScheme() + " is not supported by the provider " + this.getName());
+                        s_logger.debug("Scheme " + rules.get(0).getScheme() + " is not supported by the provider " + this.getName());
                         return false;
                     }
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java
index b49b410..b2d651c 100644
--- a/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java
+++ b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java
@@ -35,6 +35,7 @@ import org.apache.cloudstack.api.command.user.loadbalancer.CreateLoadBalancerRul
 import org.apache.cloudstack.config.ApiServiceConfiguration;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.managed.context.ManagedContextRunnable;
+import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.agent.AgentManager;
@@ -104,6 +105,7 @@ import com.cloud.vm.dao.NicDao;
 @Component
 @Local(value = {ElasticLoadBalancerManager.class})
 public class ElasticLoadBalancerManagerImpl extends ManagerBase implements ElasticLoadBalancerManager, VirtualMachineGuru {
+    private static final Logger s_logger = Logger.getLogger(ElasticLoadBalancerManagerImpl.class);
 
     @Inject
     private AgentManager _agentMgr;
@@ -162,7 +164,7 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
         try {
             answers = _agentMgr.send(elbVm.getHostId(), cmds);
         } catch (OperationTimedoutException e) {
-            logger.warn("ELB: Timed Out", e);
+            s_logger.warn("ELB: Timed Out", e);
             throw new AgentUnavailableException("Unable to send commands to virtual elbVm ", elbVm.getHostId(), e);
         }
 
@@ -249,7 +251,7 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
         DomainRouterVO elbVm = findElbVmForLb(rules.get(0));
 
         if (elbVm == null) {
-            logger.warn("Unable to apply lb rules, ELB vm  doesn't exist in the network " + network.getId());
+            s_logger.warn("Unable to apply lb rules, ELB vm  doesn't exist in the network " + network.getId());
             throw new ResourceUnavailableException("Unable to apply lb rules", DataCenter.class, network.getDataCenterId());
         }
 
@@ -269,10 +271,10 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
             }
             return applyLBRules(elbVm, lbRules, network.getId());
         } else if (elbVm.getState() == State.Stopped || elbVm.getState() == State.Stopping) {
-            logger.debug("ELB VM is in " + elbVm.getState() + ", so not sending apply LoadBalancing rules commands to the backend");
+            s_logger.debug("ELB VM is in " + elbVm.getState() + ", so not sending apply LoadBalancing rules commands to the backend");
             return true;
         } else {
-            logger.warn("Unable to apply loadbalancing rules, ELB VM is not in the right state " + elbVm.getState());
+            s_logger.warn("Unable to apply loadbalancing rules, ELB VM is not in the right state " + elbVm.getState());
             throw new ResourceUnavailableException("Unable to apply loadbalancing rules, ELB VM is not in the right state", VirtualRouter.class, elbVm.getId());
         }
     }
@@ -296,13 +298,13 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
         // this can sometimes happen, if DB is manually or programmatically manipulated
         if (offerings == null || offerings.size() < 2) {
             String msg = "Data integrity problem : System Offering For Elastic LB VM has been removed?";
-            logger.error(msg);
+            s_logger.error(msg);
             throw new ConfigurationException(msg);
         }
 
         String enabled = _configDao.getValue(Config.ElasticLoadBalancerEnabled.key());
         _enabled = (enabled == null) ? false : Boolean.parseBoolean(enabled);
-        logger.info("Elastic Load balancer enabled: " + _enabled);
+        s_logger.info("Elastic Load balancer enabled: " + _enabled);
         if (_enabled) {
             String traffType = _configDao.getValue(Config.ElasticLoadBalancerNetwork.key());
             if ("guest".equalsIgnoreCase(traffType)) {
@@ -311,11 +313,11 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
                 _frontendTrafficType = TrafficType.Public;
             } else
                 throw new ConfigurationException("ELB: Traffic type for front end of load balancer has to be guest or public; found : " + traffType);
-            logger.info("ELB: Elastic Load Balancer: will balance on " + traffType);
+            s_logger.info("ELB: Elastic Load Balancer: will balance on " + traffType);
             int gcIntervalMinutes = NumbersUtil.parseInt(configs.get(Config.ElasticLoadBalancerVmGcInterval.key()), 5);
             if (gcIntervalMinutes < 5)
                 gcIntervalMinutes = 5;
-            logger.info("ELB: Elastic Load Balancer: scheduling GC to run every " + gcIntervalMinutes + " minutes");
+            s_logger.info("ELB: Elastic Load Balancer: scheduling GC to run every " + gcIntervalMinutes + " minutes");
             _gcThreadPool = Executors.newScheduledThreadPool(1, new NamedThreadFactory("ELBVM-GC"));
             _gcThreadPool.scheduleAtFixedRate(new CleanupThread(), gcIntervalMinutes, gcIntervalMinutes, TimeUnit.MINUTES);
             _itMgr.registerGuru(VirtualMachine.Type.ElasticLoadBalancerVm, this);
@@ -327,7 +329,7 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
     }
 
     private DomainRouterVO stop(DomainRouterVO elbVm, boolean forced) throws ConcurrentOperationException, ResourceUnavailableException {
-        logger.debug("Stopping ELB vm " + elbVm);
+        s_logger.debug("Stopping ELB vm " + elbVm);
         try {
             _itMgr.advanceStop(elbVm.getUuid(), forced);
             return _routerDao.findById(elbVm.getId());
@@ -346,7 +348,7 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
         List<DomainRouterVO> unusedElbVms = _elbVmMapDao.listUnusedElbVms();
         if (unusedElbVms != null) {
             if (unusedElbVms.size() > 0) {
-                logger.info("Found " + unusedElbVms.size() + " unused ELB vms");
+                s_logger.info("Found " + unusedElbVms.size() + " unused ELB vms");
             }
             Set<Long> currentGcCandidates = new HashSet<Long>();
             for (DomainRouterVO elbVm : unusedElbVms) {
@@ -359,22 +361,22 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
                 boolean gceed = false;
 
                 try {
-                    logger.info("Attempting to stop ELB VM: " + elbVm);
+                    s_logger.info("Attempting to stop ELB VM: " + elbVm);
                     stop(elbVm, true);
                     gceed = true;
                 } catch (ConcurrentOperationException e) {
-                    logger.warn("Unable to stop unused ELB vm " + elbVm + " due to ", e);
+                    s_logger.warn("Unable to stop unused ELB vm " + elbVm + " due to ", e);
                 } catch (ResourceUnavailableException e) {
-                    logger.warn("Unable to stop unused ELB vm " + elbVm + " due to ", e);
+                    s_logger.warn("Unable to stop unused ELB vm " + elbVm + " due to ", e);
                     continue;
                 }
                 if (gceed) {
                     try {
-                        logger.info("Attempting to destroy ELB VM: " + elbVm);
+                        s_logger.info("Attempting to destroy ELB VM: " + elbVm);
                         _itMgr.expunge(elbVm.getUuid());
                         _routerDao.remove(elbVm.getId());
                     } catch (ResourceUnavailableException e) {
-                        logger.warn("Unable to destroy unused ELB vm " + elbVm + " due to ", e);
+                        s_logger.warn("Unable to destroy unused ELB vm " + elbVm + " due to ", e);
                         gceed = false;
                     }
                 }
@@ -444,14 +446,14 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
             } else if (nic.getTrafficType() == TrafficType.Control) {
                 //  control command is sent over management network in VMware
                 if (dest.getHost().getHypervisorType() == HypervisorType.VMware) {
-                    if (logger.isInfoEnabled()) {
-                        logger.info("Check if we need to add management server explicit route to ELB vm. pod cidr: " + dest.getPod().getCidrAddress() + "/"
+                    if (s_logger.isInfoEnabled()) {
+                        s_logger.info("Check if we need to add management server explicit route to ELB vm. pod cidr: " + dest.getPod().getCidrAddress() + "/"
                                 + dest.getPod().getCidrSize() + ", pod gateway: " + dest.getPod().getGateway() + ", management host: "
                                 + ApiServiceConfiguration.ManagementHostIPAdr.value());
                     }
 
-                    if (logger.isDebugEnabled()) {
-                        logger.debug("Added management server explicit route to ELB vm.");
+                    if (s_logger.isDebugEnabled()) {
+                        s_logger.debug("Added management server explicit route to ELB vm.");
                     }
                     // always add management explicit route, for basic networking setup
                     buf.append(" mgmtcidr=").append(_mgmtCidr);
@@ -477,8 +479,8 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
             buf.append(" dns2=").append(defaultDns2);
         }
 
-        if (logger.isDebugEnabled()) {
-            logger.debug("Boot Args for " + profile + ": " + buf.toString());
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Boot Args for " + profile + ": " + buf.toString());
         }
 
         if (controlNic == null) {
@@ -513,7 +515,7 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
     public boolean finalizeStart(VirtualMachineProfile profile, long hostId, Commands cmds, ReservationContext context) {
         CheckSshAnswer answer = (CheckSshAnswer)cmds.getAnswer("checkSsh");
         if (answer == null || !answer.getResult()) {
-            logger.warn("Unable to ssh to the ELB VM: " + (answer != null ? answer.getDetails() : "No answer (answer for \"checkSsh\" was null)"));
+            s_logger.warn("Unable to ssh to the ELB VM: " + (answer != null ? answer.getDetails() : "No answer (answer for \"checkSsh\" was null)"));
             return false;
         }
 
@@ -548,7 +550,7 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
         }
 
         if (controlNic == null) {
-            logger.error("Control network doesn't exist for the ELB vm " + elbVm);
+            s_logger.error("Control network doesn't exist for the ELB vm " + elbVm);
             return false;
         }
 
@@ -566,7 +568,7 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast
             lbRules.add(loadBalancing);
         }
 
-        logger.debug("Found " + lbRules.size() + " load balancing rule(s) to apply as a part of ELB vm " + elbVm + " start.");
+        s_logger.debug("Found " + lbRules.size() + " load balancing rule(s) to apply as a part of ELB vm " + elbVm + " start.");
         if (!lbRules.isEmpty()) {
             createApplyLoadBalancingRulesCommands(lbRules, elbVm, cmds, guestNetworkId);
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
index 7668a0f..1cd6851 100644
--- a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
+++ b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
@@ -26,6 +26,7 @@ import java.util.Set;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import org.apache.log4j.Logger;
 
 import com.google.gson.Gson;
 
@@ -96,6 +97,7 @@ import com.cloud.vm.VirtualMachineProfile;
 public class F5ExternalLoadBalancerElement extends ExternalLoadBalancerDeviceManagerImpl implements LoadBalancingServiceProvider, IpDeployer,
         F5ExternalLoadBalancerElementService, ExternalLoadBalancerDeviceManager {
 
+    private static final Logger s_logger = Logger.getLogger(F5ExternalLoadBalancerElement.class);
 
     @Inject
     NetworkModel _networkManager;
@@ -123,7 +125,7 @@ public class F5ExternalLoadBalancerElement extends ExternalLoadBalancerDeviceMan
     private boolean canHandle(Network config, List<LoadBalancingRule> rules) {
         if ((config.getGuestType() != Network.GuestType.Isolated && config.getGuestType() != Network.GuestType.Shared) || config.getTrafficType() != TrafficType.Guest) {
 
-            logger.trace("Not handling network with Type  " + config.getGuestType() + " and traffic type " + config.getTrafficType());
+            s_logger.trace("Not handling network with Type  " + config.getGuestType() + " and traffic type " + config.getTrafficType());
             return false;
         }
 
@@ -133,7 +135,7 @@ public class F5ExternalLoadBalancerElement extends ExternalLoadBalancerDeviceMan
             if (schemeCaps != null && rules != null && !rules.isEmpty()) {
                 for (LoadBalancingRule rule : rules) {
                     if (!schemeCaps.contains(rule.getScheme().toString())) {
-                        logger.debug("Scheme " + rules.get(0).getScheme() + " is not supported by the provider " + this.getName());
+                        s_logger.debug("Scheme " + rules.get(0).getScheme() + " is not supported by the provider " + this.getName());
                         return false;
                     }
                 }
@@ -515,8 +517,8 @@ public class F5ExternalLoadBalancerElement extends ExternalLoadBalancerDeviceMan
     public IpDeployer getIpDeployer(Network network) {
         ExternalLoadBalancerDeviceVO lbDevice = getExternalLoadBalancerForNetwork(network);
         if (lbDevice == null) {
-            logger.error("Cannot find external load balanacer for network " + network.getName());
-            logger.error("Make F5 as dummy ip deployer, since we likely met this when clean up resource after shutdown network");
+            s_logger.error("Cannot find external load balanacer for network " + network.getName());
+            s_logger.error("Make F5 as dummy ip deployer, since we likely met this when clean up resource after shutdown network");
             return this;
         }
         if (_networkManager.isNetworkInlineMode(network)) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java b/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java
index 9d9554c..042145b 100644
--- a/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java
+++ b/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java
@@ -29,6 +29,7 @@ import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.framework.config.ConfigKey;
 import org.apache.cloudstack.framework.config.Configurable;
+import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.agent.AgentManager;
@@ -81,6 +82,7 @@ import com.globo.globodns.cloudstack.resource.GloboDnsResource;
 @Local(NetworkElement.class)
 public class GloboDnsElement extends AdapterBase implements ResourceStateAdapter, NetworkElement, GloboDnsElementService, Configurable {
 
+    private static final Logger s_logger = Logger.getLogger(GloboDnsElement.class);
 
     private static final Map<Service, Map<Capability, String>> capabilities = setCapabilities();
 
@@ -132,7 +134,7 @@ public class GloboDnsElement extends AdapterBase implements ResourceStateAdapter
             throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
 
         if (!isTypeSupported(vm.getType())) {
-            logger.info("GloboDNS only manages records for VMs of type User, ConsoleProxy and DomainRouter. VM " + vm + " is " + vm.getType());
+            s_logger.info("GloboDNS only manages records for VMs of type User, ConsoleProxy and DomainRouter. VM " + vm + " is " + vm.getType());
             return false;
         }
 
@@ -162,7 +164,7 @@ public class GloboDnsElement extends AdapterBase implements ResourceStateAdapter
             ResourceUnavailableException {
 
         if (!isTypeSupported(vm.getType())) {
-            logger.info("GloboDNS only manages records for VMs of type User, ConsoleProxy and DomainRouter. VM " + vm + " is " + vm.getType());
+            s_logger.info("GloboDNS only manages records for VMs of type User, ConsoleProxy and DomainRouter. VM " + vm + " is " + vm.getType());
             return false;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/resource/GloboDnsResource.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/resource/GloboDnsResource.java b/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/resource/GloboDnsResource.java
index 9f399a9..84c1b5b 100644
--- a/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/resource/GloboDnsResource.java
+++ b/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/resource/GloboDnsResource.java
@@ -21,6 +21,7 @@ import java.util.Map;
 
 import javax.naming.ConfigurationException;
 
+import org.apache.log4j.Logger;
 
 import com.cloud.agent.IAgentControl;
 import com.cloud.agent.api.Answer;
@@ -67,6 +68,7 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
     private static final String REVERSE_DOMAIN_SUFFIX = "in-addr.arpa";
     private static final String DEFAULT_AUTHORITY_TYPE = "M";
 
+    private static final Logger s_logger = Logger.getLogger(GloboDnsResource.class);
 
     @Override
     public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
@@ -123,7 +125,7 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
 
     @Override
     public StartupCommand[] initialize() {
-        logger.trace("initialize called");
+        s_logger.trace("initialize called");
         StartupCommand cmd = new StartupCommand(getType());
         cmd.setName(_name);
         cmd.setGuid(_guid);
@@ -195,7 +197,7 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
                 if (!cmd.isOverride()) {
                     for (Record record : _globoDns.getRecordAPI().listAll(domain.getId())) {
                         if (record.getTypeNSRecordAttributes().getId() == null) {
-                            logger.warn("There are records in domain " + cmd.getNetworkDomain() + " and override is not enable. I will not delete this domain.");
+                            s_logger.warn("There are records in domain " + cmd.getNetworkDomain() + " and override is not enable. I will not delete this domain.");
                             return new Answer(cmd, true, "Domain keeped");
                         }
                     }
@@ -203,7 +205,7 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
                 _globoDns.getDomainAPI().removeDomain(domain.getId());
                 scheduleExportChangesToBind();
             } else {
-                logger.warn("Domain " + cmd.getNetworkDomain() + " already been deleted.");
+                s_logger.warn("Domain " + cmd.getNetworkDomain() + " already been deleted.");
             }
 
             return new Answer(cmd, true, "Domain removed");
@@ -244,7 +246,7 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
             Domain domain = searchDomain(cmd.getNetworkDomain(), false);
             if (domain == null) {
                 domain = _globoDns.getDomainAPI().createDomain(cmd.getNetworkDomain(), cmd.getReverseTemplateId(), DEFAULT_AUTHORITY_TYPE);
-                logger.warn("Domain " + cmd.getNetworkDomain() + " doesn't exist, maybe someone removed it. It was automatically created with template "
+                s_logger.warn("Domain " + cmd.getNetworkDomain() + " doesn't exist, maybe someone removed it. It was automatically created with template "
                         + cmd.getReverseTemplateId());
             }
 
@@ -285,7 +287,7 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
         Domain reverseDomain = searchDomain(reverseDomainName, true);
         if (reverseDomain == null) {
             reverseDomain = _globoDns.getDomainAPI().createReverseDomain(reverseDomainName, templateId, DEFAULT_AUTHORITY_TYPE);
-            logger.info("Created reverse domain " + reverseDomainName + " with template " + templateId);
+            s_logger.info("Created reverse domain " + reverseDomainName + " with template " + templateId);
         }
 
         // create reverse
@@ -301,14 +303,14 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
             if (domain == null) {
                 // create
                 domain = _globoDns.getDomainAPI().createDomain(cmd.getDomainName(), cmd.getTemplateId(), DEFAULT_AUTHORITY_TYPE);
-                logger.info("Created domain " + cmd.getDomainName() + " with template " + cmd.getTemplateId());
+                s_logger.info("Created domain " + cmd.getDomainName() + " with template " + cmd.getTemplateId());
                 if (domain == null) {
                     return new Answer(cmd, false, "Unable to create domain " + cmd.getDomainName());
                 } else {
                     needsExport = true;
                 }
             } else {
-                logger.warn("Domain " + cmd.getDomainName() + " already exist.");
+                s_logger.warn("Domain " + cmd.getDomainName() + " already exist.");
             }
             return new Answer(cmd);
         } catch (GloboDnsException e) {
@@ -329,16 +331,16 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
     protected boolean removeRecord(String recordName, String recordValue, String bindZoneName, boolean reverse, boolean override) {
         Domain domain = searchDomain(bindZoneName, reverse);
         if (domain == null) {
-            logger.warn("Domain " + bindZoneName + " doesn't exists in GloboDNS. Record " + recordName + " has already been removed.");
+            s_logger.warn("Domain " + bindZoneName + " doesn't exists in GloboDNS. Record " + recordName + " has already been removed.");
             return false;
         }
         Record record = searchRecord(recordName, domain.getId());
         if (record == null) {
-            logger.warn("Record " + recordName + " in domain " + bindZoneName + " has already been removed.");
+            s_logger.warn("Record " + recordName + " in domain " + bindZoneName + " has already been removed.");
             return false;
         } else {
             if (!override && !record.getContent().equals(recordValue)) {
-                logger.warn("Record " + recordName + " in domain " + bindZoneName + " have different value from " + recordValue
+                s_logger.warn("Record " + recordName + " in domain " + bindZoneName + " have different value from " + recordValue
                         + " and override is not enable. I will not delete it.");
                 return false;
             }
@@ -361,7 +363,7 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
         if (record == null) {
             // Create new record
             record = _globoDns.getRecordAPI().createRecord(domainId, name, ip, type);
-            logger.info("Created record " + record.getName() + " in domain " + domainId);
+            s_logger.info("Created record " + record.getName() + " in domain " + domainId);
         } else {
             if (!ip.equals(record.getContent())) {
                 if (Boolean.TRUE.equals(override)) {
@@ -382,10 +384,10 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
         try {
             Export export = _globoDns.getExportAPI().scheduleExport();
             if (export != null) {
-                logger.info("GloboDns Export: " + export.getResult());
+                s_logger.info("GloboDns Export: " + export.getResult());
             }
         } catch (GloboDnsException e) {
-            logger.warn("Error on scheduling export. Although everything was persist, someone need to manually force export in GloboDns", e);
+            s_logger.warn("Error on scheduling export. Although everything was persist, someone need to manually force export in GloboDns", e);
         }
     }
 
@@ -426,11 +428,11 @@ public class GloboDnsResource extends ManagerBase implements ServerResource {
         // GloboDns search name in name and content. We need to iterate to check if recordName exists only in name
         for (Record candidate : candidates) {
             if (recordName.equalsIgnoreCase(candidate.getName())) {
-                logger.debug("Record " + recordName + " in domain id " + domainId + " found in GloboDNS");
+                s_logger.debug("Record " + recordName + " in domain id " + domainId + " found in GloboDNS");
                 return candidate;
             }
         }
-        logger.debug("Record " + recordName + " in domain id " + domainId + " not found in GloboDNS");
+        s_logger.debug("Record " + recordName + " in domain id " + domainId + " not found in GloboDNS");
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/element/InternalLoadBalancerElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/element/InternalLoadBalancerElement.java b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/element/InternalLoadBalancerElement.java
index eb2b4b7..fcdbfb7 100644
--- a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/element/InternalLoadBalancerElement.java
+++ b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/element/InternalLoadBalancerElement.java
@@ -27,6 +27,8 @@ import java.util.Set;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.api.command.admin.internallb.ConfigureInternalLoadBalancerElementCmd;
 import org.apache.cloudstack.api.command.admin.internallb.CreateInternalLoadBalancerElementCmd;
 import org.apache.cloudstack.api.command.admin.internallb.ListInternalLoadBalancerElementsCmd;
@@ -55,7 +57,6 @@ import com.cloud.network.VirtualRouterProvider.Type;
 import com.cloud.network.dao.NetworkServiceMapDao;
 import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
 import com.cloud.network.dao.VirtualRouterProviderDao;
-import com.cloud.network.element.HAProxyLBRule;
 import com.cloud.network.element.IpDeployer;
 import com.cloud.network.element.LoadBalancingServiceProvider;
 import com.cloud.network.element.NetworkElement;
@@ -85,6 +86,7 @@ import com.cloud.vm.dao.DomainRouterDao;
 
 @Local(value = {NetworkElement.class})
 public class InternalLoadBalancerElement extends AdapterBase implements LoadBalancingServiceProvider, InternalLoadBalancerElementService, IpDeployer {
+    private static final Logger s_logger = Logger.getLogger(InternalLoadBalancerElement.class);
     protected static final Map<Service, Map<Capability, String>> capabilities = setCapabilities();
     private static InternalLoadBalancerElement internalLbElement = null;
 
@@ -108,8 +110,6 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
     ApplicationLoadBalancerRuleDao _appLbDao;
     @Inject
     EntityManager _entityMgr;
-    @Inject
-    private HAProxyLBRule haProxyLBRule;
 
     protected InternalLoadBalancerElement() {
     }
@@ -125,11 +125,11 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
         //works in Advance zone only
         DataCenter dc = _entityMgr.findById(DataCenter.class, config.getDataCenterId());
         if (dc.getNetworkType() != NetworkType.Advanced) {
-            logger.trace("Not hanling zone of network type " + dc.getNetworkType());
+            s_logger.trace("Not hanling zone of network type " + dc.getNetworkType());
             return false;
         }
         if (config.getGuestType() != Network.GuestType.Isolated || config.getTrafficType() != TrafficType.Guest) {
-            logger.trace("Not handling network with Type  " + config.getGuestType() + " and traffic type " + config.getTrafficType());
+            s_logger.trace("Not handling network with Type  " + config.getGuestType() + " and traffic type " + config.getTrafficType());
             return false;
         }
 
@@ -138,14 +138,14 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
             String schemeCaps = lbCaps.get(Capability.LbSchemes);
             if (schemeCaps != null && lbScheme != null) {
                 if (!schemeCaps.contains(lbScheme.toString())) {
-                    logger.debug("Scheme " + lbScheme.toString() + " is not supported by the provider " + getName());
+                    s_logger.debug("Scheme " + lbScheme.toString() + " is not supported by the provider " + getName());
                     return false;
                 }
             }
         }
 
         if (!_ntwkModel.isProviderSupportServiceInNetwork(config.getId(), Service.Lb, getProvider())) {
-            logger.trace("Element " + getProvider().getName() + " doesn't support service " + Service.Lb + " in the network " + config);
+            s_logger.trace("Element " + getProvider().getName() + " doesn't support service " + Service.Lb + " in the network " + config);
             return false;
         }
         return true;
@@ -163,10 +163,10 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
 
     @Override
     public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
-    ResourceUnavailableException, InsufficientCapacityException {
+        ResourceUnavailableException, InsufficientCapacityException {
 
         if (!canHandle(network, null)) {
-            logger.trace("No need to implement " + getName());
+            s_logger.trace("No need to implement " + getName());
             return true;
         }
 
@@ -175,10 +175,10 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
 
     @Override
     public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-            throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
+        throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
 
         if (!canHandle(network, null)) {
-            logger.trace("No need to prepare " + getName());
+            s_logger.trace("No need to prepare " + getName());
             return true;
         }
 
@@ -197,16 +197,16 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
             Ip sourceIp = new Ip(ip);
             long active = _appLbDao.countActiveBySourceIp(sourceIp, network.getId());
             if (active > 0) {
-                logger.debug("Have to implement internal lb vm for source ip " + sourceIp + " as a part of network " + network + " implement as there are " + active +
-                        " internal lb rules exist for this ip");
+                s_logger.debug("Have to implement internal lb vm for source ip " + sourceIp + " as a part of network " + network + " implement as there are " + active +
+                    " internal lb rules exist for this ip");
                 List<? extends VirtualRouter> internalLbVms;
                 try {
                     internalLbVms = _internalLbMgr.deployInternalLbVm(network, sourceIp, dest, _accountMgr.getAccount(network.getAccountId()), null);
                 } catch (InsufficientCapacityException e) {
-                    logger.warn("Failed to deploy element " + getName() + " for ip " + sourceIp + " due to:", e);
+                    s_logger.warn("Failed to deploy element " + getName() + " for ip " + sourceIp + " due to:", e);
                     return false;
                 } catch (ConcurrentOperationException e) {
-                    logger.warn("Failed to deploy element " + getName() + " for ip " + sourceIp + " due to:", e);
+                    s_logger.warn("Failed to deploy element " + getName() + " for ip " + sourceIp + " due to:", e);
                     return false;
                 }
 
@@ -221,7 +221,7 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
 
     @Override
     public boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context) throws ConcurrentOperationException,
-    ResourceUnavailableException {
+        ResourceUnavailableException {
         return true;
     }
 
@@ -236,11 +236,11 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
             result = result && _internalLbMgr.destroyInternalLbVm(internalLbVm.getId(), context.getAccount(), context.getCaller().getId());
             if (cleanup) {
                 if (!result) {
-                    logger.warn("Failed to stop internal lb element " + internalLbVm + ", but would try to process clean up anyway.");
+                    s_logger.warn("Failed to stop internal lb element " + internalLbVm + ", but would try to process clean up anyway.");
                 }
                 result = (_internalLbMgr.destroyInternalLbVm(internalLbVm.getId(), context.getAccount(), context.getCaller().getId()));
                 if (!result) {
-                    logger.warn("Failed to clean up internal lb element " + internalLbVm);
+                    s_logger.warn("Failed to clean up internal lb element " + internalLbVm);
                 }
             }
         }
@@ -271,7 +271,7 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
 
     @Override
     public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) throws ConcurrentOperationException,
-    ResourceUnavailableException {
+        ResourceUnavailableException {
         VirtualRouterProviderVO element = _vrProviderDao.findByNspIdAndType(provider.getId(), Type.InternalLbVm);
         if (element == null) {
             return true;
@@ -309,7 +309,7 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
 
         //2) Get rules to apply
         Map<Ip, List<LoadBalancingRule>> rulesToApply = getLbRulesToApply(rules);
-        logger.debug("Applying " + rulesToApply.size() + " on element " + getName());
+        s_logger.debug("Applying " + rulesToApply.size() + " on element " + getName());
 
         for (Ip sourceIp : rulesToApply.keySet()) {
             if (vmsToDestroy.contains(sourceIp)) {
@@ -318,11 +318,11 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
                 if (vms.size() > 0) {
                     //only one internal lb per IP exists
                     try {
-                        logger.debug("Destroying internal lb vm for ip " + sourceIp.addr() + " as all the rules for this vm are in Revoke state");
+                        s_logger.debug("Destroying internal lb vm for ip " + sourceIp.addr() + " as all the rules for this vm are in Revoke state");
                         return _internalLbMgr.destroyInternalLbVm(vms.get(0).getId(), _accountMgr.getAccount(Account.ACCOUNT_ID_SYSTEM),
-                                _accountMgr.getUserIncludingRemoved(User.UID_SYSTEM).getId());
+                            _accountMgr.getUserIncludingRemoved(User.UID_SYSTEM).getId());
                     } catch (ConcurrentOperationException e) {
-                        logger.warn("Failed to apply lb rule(s) for ip " + sourceIp.addr() + " on the element " + getName() + " due to:", e);
+                        s_logger.warn("Failed to apply lb rule(s) for ip " + sourceIp.addr() + " on the element " + getName() + " due to:", e);
                         return false;
                     }
                 }
@@ -333,10 +333,10 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
                     DeployDestination dest = new DeployDestination(_entityMgr.findById(DataCenter.class, network.getDataCenterId()), null, null, null);
                     internalLbVms = _internalLbMgr.deployInternalLbVm(network, sourceIp, dest, _accountMgr.getAccount(network.getAccountId()), null);
                 } catch (InsufficientCapacityException e) {
-                    logger.warn("Failed to apply lb rule(s) for ip " + sourceIp.addr() + "on the element " + getName() + " due to:", e);
+                    s_logger.warn("Failed to apply lb rule(s) for ip " + sourceIp.addr() + "on the element " + getName() + " due to:", e);
                     return false;
                 } catch (ConcurrentOperationException e) {
-                    logger.warn("Failed to apply lb rule(s) for ip " + sourceIp.addr() + "on the element " + getName() + " due to:", e);
+                    s_logger.warn("Failed to apply lb rule(s) for ip " + sourceIp.addr() + "on the element " + getName() + " due to:", e);
                     return false;
                 }
 
@@ -347,7 +347,7 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
                 //2.3 Apply Internal LB rules on the VM
                 if (!_internalLbMgr.applyLoadBalancingRules(network, rulesToApply.get(sourceIp), internalLbVms)) {
                     throw new CloudRuntimeException("Failed to apply load balancing rules for ip " + sourceIp.addr() + " in network " + network.getId() + " on element " +
-                            getName());
+                        getName());
                 }
             }
         }
@@ -372,7 +372,7 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
             //2) Check if there are non revoked rules for the source ip address
             List<LoadBalancingRule> rulesToCheck = groupedRules.get(sourceIp);
             if (_appLbDao.countBySourceIpAndNotRevoked(sourceIp, rulesToCheck.get(0).getNetworkId()) == 0) {
-                logger.debug("Have to destroy internal lb vm for source ip " + sourceIp + " as it has 0 rules in non-Revoke state");
+                s_logger.debug("Have to destroy internal lb vm for source ip " + sourceIp + " as it has 0 rules in non-Revoke state");
                 vmsToDestroy.add(sourceIp);
             }
         }
@@ -395,7 +395,7 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
                 rulesToApply.add(rule);
                 groupedRules.put(sourceIp, rulesToApply);
             } else {
-                logger.debug("Internal lb rule " + rule + " doesn't have any vms assigned, skipping");
+                s_logger.debug("Internal lb rule " + rule + " doesn't have any vms assigned, skipping");
             }
         }
         return groupedRules;
@@ -410,7 +410,7 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
             if (routers == null || routers.isEmpty()) {
                 return true;
             }
-            return haProxyLBRule.validateHAProxyLBRule(rule);
+            return VirtualRouterElement.validateHAProxyLBRule(rule);
         }
         return true;
     }
@@ -449,7 +449,7 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
         VirtualRouterProviderVO element = _vrProviderDao.findById(id);
         if (element == null || element.getType() != Type.InternalLbVm) {
             throw new InvalidParameterValueException("Can't find " + getName() + " element with network service provider id " + id + " to be used as a provider for " +
-                    getName());
+                getName());
         }
 
         element.setEnabled(enable);
@@ -462,7 +462,7 @@ public class InternalLoadBalancerElement extends AdapterBase implements LoadBala
     public VirtualRouterProvider addInternalLoadBalancerElement(long ntwkSvcProviderId) {
         VirtualRouterProviderVO element = _vrProviderDao.findByNspIdAndType(ntwkSvcProviderId, Type.InternalLbVm);
         if (element != null) {
-            logger.debug("There is already an " + getName() + " with service provider id " + ntwkSvcProviderId);
+            s_logger.debug("There is already an " + getName() + " with service provider id " + ntwkSvcProviderId);
             return null;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
index 59f07f6..88ab512 100644
--- a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
+++ b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
@@ -32,6 +32,7 @@ import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.lb.ApplicationLoadBalancerRuleVO;
 import org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDao;
+import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
@@ -120,6 +121,7 @@ import com.cloud.vm.dao.NicDao;
 
 @Local(value = {InternalLoadBalancerVMManager.class, InternalLoadBalancerVMService.class})
 public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements InternalLoadBalancerVMManager, InternalLoadBalancerVMService, VirtualMachineGuru {
+    private static final Logger s_logger = Logger.getLogger(InternalLoadBalancerVMManagerImpl.class);
     static final private String InternalLbVmNamePrefix = "b";
 
     private String _instance;
@@ -204,13 +206,13 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
                 controlNic = nic;
                 // Internal LB control command is sent over management server in VMware
                 if (dest.getHost().getHypervisorType() == HypervisorType.VMware) {
-                    if (logger.isInfoEnabled()) {
-                        logger.info("Check if we need to add management server explicit route to Internal LB. pod cidr: " + dest.getPod().getCidrAddress() + "/" +
+                    if (s_logger.isInfoEnabled()) {
+                        s_logger.info("Check if we need to add management server explicit route to Internal LB. pod cidr: " + dest.getPod().getCidrAddress() + "/" +
                                 dest.getPod().getCidrSize() + ", pod gateway: " + dest.getPod().getGateway() + ", management host: " + _mgmtHost);
                     }
 
-                    if (logger.isInfoEnabled()) {
-                        logger.info("Add management server explicit route to Internal LB.");
+                    if (s_logger.isInfoEnabled()) {
+                        s_logger.info("Add management server explicit route to Internal LB.");
                     }
 
                     buf.append(" mgmtcidr=").append(_mgmtCidr);
@@ -233,8 +235,8 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
         final String type = "ilbvm";
         buf.append(" type=" + type);
 
-        if (logger.isDebugEnabled()) {
-            logger.debug("Boot Args for " + profile + ": " + buf.toString());
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Boot Args for " + profile + ": " + buf.toString());
         }
 
         return true;
@@ -269,7 +271,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
         if (answer != null && answer instanceof CheckSshAnswer) {
             final CheckSshAnswer sshAnswer = (CheckSshAnswer)answer;
             if (sshAnswer == null || !sshAnswer.getResult()) {
-                logger.warn("Unable to ssh to the internal LB VM: " + sshAnswer.getDetails());
+                s_logger.warn("Unable to ssh to the internal LB VM: " + sshAnswer.getDetails());
                 result = false;
             }
         } else {
@@ -293,7 +295,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
         if (answer != null && answer instanceof GetDomRVersionAnswer) {
             final GetDomRVersionAnswer versionAnswer = (GetDomRVersionAnswer)answer;
             if (answer == null || !answer.getResult()) {
-                logger.warn("Unable to get the template/scripts version of internal LB VM " + internalLbVm.getInstanceName() + " due to: " + versionAnswer.getDetails());
+                s_logger.warn("Unable to get the template/scripts version of internal LB VM " + internalLbVm.getInstanceName() + " due to: " + versionAnswer.getDetails());
                 result = false;
             } else {
                 internalLbVm.setTemplateVersion(versionAnswer.getTemplateVersion());
@@ -313,7 +315,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
         final NicProfile controlNic = getNicProfileByTrafficType(profile, TrafficType.Control);
 
         if (controlNic == null) {
-            logger.error("Control network doesn't exist for the internal LB vm " + internalLbVm);
+            s_logger.error("Control network doesn't exist for the internal LB vm " + internalLbVm);
             return false;
         }
 
@@ -373,7 +375,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
             if (off != null) {
                 _internalLbVmOfferingId = off.getId();
             } else {
-                logger.warn("Invalid offering UUID is passed in " + Config.InternalLbVmServiceOfferingId.key() + "; the default offering will be used instead");
+                s_logger.warn("Invalid offering UUID is passed in " + Config.InternalLbVmServiceOfferingId.key() + "; the default offering will be used instead");
             }
         }
 
@@ -385,15 +387,15 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
                     Storage.ProvisioningType.THIN, true, null, true, VirtualMachine.Type.InternalLoadBalancerVm, true);
             if (offerings == null || offerings.size() < 2) {
                 String msg = "Data integrity problem : System Offering For Internal LB VM has been removed?";
-                logger.error(msg);
+                s_logger.error(msg);
                 throw new ConfigurationException(msg);
             }
         }
 
         _itMgr.registerGuru(VirtualMachine.Type.InternalLoadBalancerVm, this);
 
-        if (logger.isInfoEnabled()) {
-            logger.info(getName() + " has been configured");
+        if (s_logger.isInfoEnabled()) {
+            s_logger.info(getName() + " has been configured");
         }
 
         return true;
@@ -424,7 +426,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
     }
 
     protected void finalizeLbRulesForIp(final Commands cmds, final DomainRouterVO internalLbVm, final Provider provider, final Ip sourceIp, final long guestNtwkId) {
-        logger.debug("Resending load balancing rules as a part of start for " + internalLbVm);
+        s_logger.debug("Resending load balancing rules as a part of start for " + internalLbVm);
         final List<ApplicationLoadBalancerRuleVO> lbs = _lbDao.listBySrcIpSrcNtwkId(sourceIp, guestNtwkId);
         final List<LoadBalancingRule> lbRules = new ArrayList<LoadBalancingRule>();
         if (_ntwkModel.isProviderSupportServiceInNetwork(guestNtwkId, Service.Lb, provider)) {
@@ -438,7 +440,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
             }
         }
 
-        logger.debug("Found " + lbRules.size() + " load balancing rule(s) to apply as a part of Intenrnal LB vm" + internalLbVm + " start.");
+        s_logger.debug("Found " + lbRules.size() + " load balancing rule(s) to apply as a part of Intenrnal LB vm" + internalLbVm + " start.");
         if (!lbRules.isEmpty()) {
             createApplyLoadBalancingRulesCommands(lbRules, internalLbVm, cmds, guestNtwkId);
         }
@@ -505,7 +507,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
         }
 
         if (controlIpAddress == null) {
-            logger.warn("Unable to find Internal LB control ip in its attached NICs!. Internal LB vm: " + internalLbVmId);
+            s_logger.warn("Unable to find Internal LB control ip in its attached NICs!. Internal LB vm: " + internalLbVmId);
             final DomainRouterVO internalLbVm = _internalLbVmDao.findById(internalLbVmId);
             return internalLbVm.getPrivateIpAddress();
         }
@@ -515,8 +517,8 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
 
     @Override
     public boolean destroyInternalLbVm(final long vmId, final Account caller, final Long callerUserId) throws ResourceUnavailableException, ConcurrentOperationException {
-        if (logger.isDebugEnabled()) {
-            logger.debug("Attempting to destroy Internal LB vm " + vmId);
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Attempting to destroy Internal LB vm " + vmId);
         }
 
         final DomainRouterVO internalLbVm = _internalLbVmDao.findById(vmId);
@@ -546,7 +548,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
 
     protected VirtualRouter stopInternalLbVm(final DomainRouterVO internalLbVm, final boolean forced, final Account caller, final long callerUserId) throws ResourceUnavailableException,
     ConcurrentOperationException {
-        logger.debug("Stopping internal lb vm " + internalLbVm);
+        s_logger.debug("Stopping internal lb vm " + internalLbVm);
         try {
             _itMgr.advanceStop(internalLbVm.getUuid(), forced);
             return _internalLbVmDao.findById(internalLbVm.getId());
@@ -571,7 +573,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
         if (internalLbVms != null) {
             runningInternalLbVms = new ArrayList<DomainRouterVO>();
         } else {
-            logger.debug("Have no internal lb vms to start");
+            s_logger.debug("Have no internal lb vms to start");
             return null;
         }
 
@@ -597,8 +599,8 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
             throw new ConcurrentOperationException("Unable to lock network " + guestNetwork.getId());
         }
 
-        if (logger.isDebugEnabled()) {
-            logger.debug("Lock is acquired for network id " + lock.getId() + " as a part of internal lb startup in " + dest);
+        if (s_logger.isDebugEnabled()) {
+            s_logger.debug("Lock is acquired for network id " + lock.getId() + " as a part of internal lb startup in " + dest);
         }
 
         final long internalLbProviderId = getInternalLbProviderId(guestNetwork);
@@ -614,7 +616,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
             final DeploymentPlan plan = planAndInternalLbVms.first();
 
             if (internalLbVms.size() > 0) {
-                logger.debug("Found " + internalLbVms.size() + " internal lb vms for the requested IP " + requestedGuestIp.addr());
+                s_logger.debug("Found " + internalLbVms.size() + " internal lb vms for the requested IP " + requestedGuestIp.addr());
                 return internalLbVms;
             }
 
@@ -634,8 +636,8 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
         } finally {
             if (lock != null) {
                 _networkDao.releaseFromLockTable(lock.getId());
-                if (logger.isDebugEnabled()) {
-                    logger.debug("Lock is released for network id " + lock.getId() + " as a part of internal lb vm startup in " + dest);
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("Lock is released for network id " + lock.getId() + " as a part of internal lb vm startup in " + dest);
                 }
             }
         }
@@ -667,7 +669,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
 
         //1) Guest network - default
         if (guestNetwork != null) {
-            logger.debug("Adding nic for Internal LB in Guest network " + guestNetwork);
+            s_logger.debug("Adding nic for Internal LB in Guest network " + guestNetwork);
             final NicProfile guestNic = new NicProfile();
             if (guestIp != null) {
                 guestNic.setIPv4Address(guestIp.addr());
@@ -686,7 +688,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
         }
 
         //2) Control network
-        logger.debug("Adding nic for Internal LB vm in Control network ");
+        s_logger.debug("Adding nic for Internal LB vm in Control network ");
         final List<? extends NetworkOffering> offerings = _ntwkModel.getSystemAccountNetworkOfferings(NetworkOffering.SystemControlNetwork);
         final NetworkOffering controlOffering = offerings.get(0);
         final Network controlConfig = _ntwkMgr.setupNetwork(_accountMgr.getSystemAccount(), controlOffering, plan, null, null, false).get(0);
@@ -738,8 +740,8 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
             final HypervisorType hType = iter.next();
             try {
                 final long id = _internalLbVmDao.getNextInSequence(Long.class, "id");
-                if (logger.isDebugEnabled()) {
-                    logger.debug("Creating the internal lb vm " + id + " in datacenter " + dest.getDataCenter() + " with hypervisor type " + hType);
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("Creating the internal lb vm " + id + " in datacenter " + dest.getDataCenter() + " with hypervisor type " + hType);
                 }
                 String templateName = null;
                 switch (hType) {
@@ -764,7 +766,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
                 final VMTemplateVO template = _templateDao.findRoutingTemplate(hType, templateName);
 
                 if (template == null) {
-                    logger.debug(hType + " won't support system vm, skip it");
+                    s_logger.debug(hType + " won't support system vm, skip it");
                     continue;
                 }
 
@@ -782,7 +784,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
                 internalLbVm = _internalLbVmDao.findById(internalLbVm.getId());
             } catch (final InsufficientCapacityException ex) {
                 if (allocateRetry < 2 && iter.hasNext()) {
-                    logger.debug("Failed to allocate the Internal lb vm with hypervisor type " + hType + ", retrying one more time");
+                    s_logger.debug("Failed to allocate the Internal lb vm with hypervisor type " + hType + ", retrying one more time");
                     continue;
                 } else {
                     throw ex;
@@ -797,7 +799,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
                     break;
                 } catch (final InsufficientCapacityException ex) {
                     if (startRetry < 2 && iter.hasNext()) {
-                        logger.debug("Failed to start the Internal lb vm  " + internalLbVm + " with hypervisor type " + hType + ", " +
+                        s_logger.debug("Failed to start the Internal lb vm  " + internalLbVm + " with hypervisor type " + hType + ", " +
                                 "destroying it and recreating one more time");
                         // destroy the internal lb vm
                         destroyInternalLbVm(internalLbVm.getId(), _accountMgr.getSystemAccount(), User.UID_SYSTEM);
@@ -818,10 +820,10 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
 
     protected DomainRouterVO startInternalLbVm(DomainRouterVO internalLbVm, final Account caller, final long callerUserId, final Map<Param, Object> params)
             throws StorageUnavailableException, InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException {
-        logger.debug("Starting Internal LB VM " + internalLbVm);
+        s_logger.debug("Starting Internal LB VM " + internalLbVm);
         _itMgr.start(internalLbVm.getUuid(), params, null, null);
         if (internalLbVm.isStopPending()) {
-            logger.info("Clear the stop pending flag of Internal LB VM " + internalLbVm.getHostName() + " after start router successfully!");
+            s_logger.info("Clear the stop pending flag of Internal LB VM " + internalLbVm.getHostName() + " after start router successfully!");
             internalLbVm.setStopPending(false);
             internalLbVm = _internalLbVmDao.persist(internalLbVm);
         }
@@ -860,10 +862,10 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
     public boolean applyLoadBalancingRules(final Network network, final List<LoadBalancingRule> rules, final List<? extends VirtualRouter> internalLbVms)
             throws ResourceUnavailableException {
         if (rules == null || rules.isEmpty()) {
-            logger.debug("No lb rules to be applied for network " + network);
+            s_logger.debug("No lb rules to be applied for network " + network);
             return true;
         }
-        logger.info("lb rules to be applied for network ");
+        s_logger.info("lb rules to be applied for network ");
         //only one internal lb vm is supported per ip address at this time
         if (internalLbVms == null || internalLbVms.isEmpty()) {
             throw new CloudRuntimeException("Can't apply the lb rules on network " + network + " as the list of internal lb vms is empty");
@@ -873,10 +875,10 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
         if (lbVm.getState() == State.Running) {
             return sendLBRules(lbVm, rules, network.getId());
         } else if (lbVm.getState() == State.Stopped || lbVm.getState() == State.Stopping) {
-            logger.debug("Internal LB VM " + lbVm.getInstanceName() + " is in " + lbVm.getState() + ", so not sending apply lb rules commands to the backend");
+            s_logger.debug("Internal LB VM " + lbVm.getInstanceName() + " is in " + lbVm.getState() + ", so not sending apply lb rules commands to the backend");
             return true;
         } else {
-            logger.warn("Unable to apply lb rules, Internal LB VM is not in the right state " + lbVm.getState());
+            s_logger.warn("Unable to apply lb rules, Internal LB VM is not in the right state " + lbVm.getState());
             throw new ResourceUnavailableException("Unable to apply lb rules; Internal LB VM is not in the right state", DataCenter.class, lbVm.getDataCenterId());
         }
     }
@@ -892,7 +894,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In
         try {
             answers = _agentMgr.send(internalLbVm.getHostId(), cmds);
         } catch (final OperationTimedoutException e) {
-            logger.warn("Timed Out", e);
+            s_logger.warn("Timed Out", e);
             throw new AgentUnavailableException("Unable to send commands to virtual router ", internalLbVm.getHostId(), e);
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc02940/plugins/network-elements/internal-loadbalancer/test/resources/lb_element.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/test/resources/lb_element.xml b/plugins/network-elements/internal-loadbalancer/test/resources/lb_element.xml
index 6be23c8..5dec9c3 100644
--- a/plugins/network-elements/internal-loadbalancer/test/resources/lb_element.xml
+++ b/plugins/network-elements/internal-loadbalancer/test/resources/lb_element.xml
@@ -42,5 +42,5 @@
     </bean>
   
     <bean class="org.apache.cloudstack.internallbelement.ElementChildTestConfiguration" />
-    <bean class="com.cloud.network.element.HAProxyLBRule" />
+    
 </beans>


Mime
View raw message