cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [11/36] git commit: updated refs/heads/master to cd7218e
Date Sat, 29 Aug 2015 20:06:08 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
index b4e3bc3..1281267 100644
--- a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
+++ b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
@@ -27,7 +27,6 @@ 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.api.command.user.firewall.IListFirewallRulesCmd;
@@ -100,7 +99,6 @@ import com.cloud.vm.dao.UserVmDao;
 @Component
 @Local(value = {FirewallService.class, FirewallManager.class})
 public class FirewallManagerImpl extends ManagerBase implements FirewallService, FirewallManager, NetworkRuleApplier {
-    private static final Logger s_logger = Logger.getLogger(FirewallManagerImpl.class);
 
     @Inject
     FirewallRulesDao _firewallDao;
@@ -156,7 +154,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
 
     @Override
     public boolean start() {
-        s_logger.info("Firewall provider list is " + _firewallElements.iterator().next());
+        logger.info("Firewall provider list is " + _firewallElements.iterator().next());
         return super.start();
     }
 
@@ -437,8 +435,8 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
             }
         }
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("No network rule conflicts detected for " + newRule + " against " + (rules.size() - 1) + " existing rules");
+        if (logger.isDebugEnabled()) {
+            logger.debug("No network rule conflicts detected for " + newRule + " against " + (rules.size() - 1) + " existing rules");
         }
     }
 
@@ -525,12 +523,12 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
     public boolean applyRules(List<? extends FirewallRule> rules, boolean continueOnError, boolean updateRulesInDB) throws ResourceUnavailableException {
         boolean success = true;
         if (rules == null || rules.size() == 0) {
-            s_logger.debug("There are no rules to forward to the network elements");
+            logger.debug("There are no rules to forward to the network elements");
             return true;
         }
         Purpose purpose = rules.get(0).getPurpose();
         if (!_ipAddrMgr.applyRules(rules, purpose, this, continueOnError)) {
-            s_logger.warn("Rules are not completely applied");
+            logger.warn("Rules are not completely applied");
             return false;
         } else {
             if (updateRulesInDB) {
@@ -538,7 +536,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
                     if (rule.getState() == FirewallRule.State.Revoke) {
                         FirewallRuleVO relatedRule = _firewallDao.findByRelatedId(rule.getId());
                         if (relatedRule != null) {
-                            s_logger.warn("Can't remove the firewall rule id=" + rule.getId() + " as it has related firewall rule id=" + relatedRule.getId() +
+                            logger.warn("Can't remove the firewall rule id=" + rule.getId() + " as it has related firewall rule id=" + relatedRule.getId() +
                                 "; leaving it in Revoke state");
                             success = false;
                         } else {
@@ -605,7 +603,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
             break;*/
         default:
                 assert (false) : "Unexpected fall through in applying rules to the network elements";
-            s_logger.error("FirewallManager cannot process rules of type " + purpose);
+            logger.error("FirewallManager cannot process rules of type " + purpose);
             throw new CloudRuntimeException("FirewallManager cannot process rules of type " + purpose);
         }
         return handled;
@@ -641,7 +639,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
     public boolean applyFirewallRules(List<FirewallRuleVO> rules, boolean continueOnError, Account caller) {
 
         if (rules.size() == 0) {
-            s_logger.debug("There are no firewall rules to apply");
+            logger.debug("There are no firewall rules to apply");
             return true;
         }
 
@@ -659,7 +657,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
                 return false;
             }
         } catch (ResourceUnavailableException ex) {
-            s_logger.warn("Failed to apply firewall rules due to : "+ ex.getMessage());
+            logger.warn("Failed to apply firewall rules due to : "+ ex.getMessage());
             return false;
         }
 
@@ -669,7 +667,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
     @Override
     public boolean applyDefaultEgressFirewallRule(Long networkId, boolean defaultPolicy, boolean add) throws ResourceUnavailableException {
 
-        s_logger.debug("applying default firewall egress rules ");
+        logger.debug("applying default firewall egress rules ");
 
         NetworkVO network = _networkDao.findById(networkId);
         List<String> sourceCidr = new ArrayList<String>();
@@ -688,7 +686,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
                 return  false;
             }
         } catch (ResourceUnavailableException ex) {
-            s_logger.warn("Failed to apply default egress rules for guest network due to ", ex);
+            logger.warn("Failed to apply default egress rules for guest network due to ", ex);
             return false;
         }
         return true;
@@ -804,8 +802,8 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
         boolean generateUsageEvent = false;
 
         if (rule.getState() == State.Staged) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Found a rule that is still in stage state so just removing it: " + rule);
+            if (logger.isDebugEnabled()) {
+                logger.debug("Found a rule that is still in stage state so just removing it: " + rule);
             }
             removeRule(rule);
             generateUsageEvent = true;
@@ -834,8 +832,8 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
         List<FirewallRule> rules = new ArrayList<FirewallRule>();
 
         List<FirewallRuleVO> fwRules = _firewallDao.listByIpAndPurposeAndNotRevoked(ipId, Purpose.Firewall);
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Releasing " + fwRules.size() + " firewall rules for ip id=" + ipId);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Releasing " + fwRules.size() + " firewall rules for ip id=" + ipId);
         }
 
         for (FirewallRuleVO rule : fwRules) {
@@ -851,8 +849,8 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
         // Now we check again in case more rules have been inserted.
         rules.addAll(_firewallDao.listByIpAndPurposeAndNotRevoked(ipId, Purpose.Firewall));
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Successfully released firewall rules for ip id=" + ipId + " and # of rules now = " + rules.size());
+        if (logger.isDebugEnabled()) {
+            logger.debug("Successfully released firewall rules for ip id=" + ipId + " and # of rules now = " + rules.size());
         }
 
         return rules.size() == 0;
@@ -881,8 +879,8 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
         List<FirewallRule> rules = new ArrayList<FirewallRule>();
 
         List<FirewallRuleVO> fwRules = _firewallDao.listByNetworkAndPurposeAndNotRevoked(networkId, Purpose.Firewall);
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Releasing " + fwRules.size() + " firewall rules for network id=" + networkId);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Releasing " + fwRules.size() + " firewall rules for network id=" + networkId);
         }
 
         for (FirewallRuleVO rule : fwRules) {
@@ -898,8 +896,8 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
         // Now we check again in case more rules have been inserted.
         rules.addAll(_firewallDao.listByNetworkAndPurposeAndNotRevoked(networkId, Purpose.Firewall));
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Successfully released firewall rules for network id=" + networkId + " and # of rules now = " + rules.size());
+        if (logger.isDebugEnabled()) {
+            logger.debug("Successfully released firewall rules for network id=" + networkId + " and # of rules now = " + rules.size());
         }
 
         return success && rules.size() == 0;
@@ -910,11 +908,11 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
         FirewallRule fwRule = _firewallDao.findByRelatedId(ruleId);
 
         if (fwRule == null) {
-            s_logger.trace("No related firewall rule exists for rule id=" + ruleId + " so returning true here");
+            logger.trace("No related firewall rule exists for rule id=" + ruleId + " so returning true here");
             return true;
         }
 
-        s_logger.debug("Revoking Firewall rule id=" + fwRule.getId() + " as a part of rule delete id=" + ruleId + " with apply=" + apply);
+        logger.debug("Revoking Firewall rule id=" + fwRule.getId() + " as a part of rule delete id=" + ruleId + " with apply=" + apply);
         return revokeIngressFirewallRule(fwRule.getId(), apply);
 
     }
@@ -950,10 +948,10 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
         Set<Long> ipsToReprogram = new HashSet<Long>();
 
         if (firewallRules.isEmpty()) {
-            s_logger.debug("No firewall rules are found for vm id=" + vmId);
+            logger.debug("No firewall rules are found for vm id=" + vmId);
             return true;
         } else {
-            s_logger.debug("Found " + firewallRules.size() + " to cleanup for vm id=" + vmId);
+            logger.debug("Found " + firewallRules.size() + " to cleanup for vm id=" + vmId);
         }
 
         for (FirewallRuleVO rule : firewallRules) {
@@ -964,11 +962,11 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
 
         // apply rules for all ip addresses
         for (Long ipId : ipsToReprogram) {
-            s_logger.debug("Applying firewall rules for ip address id=" + ipId + " as a part of vm expunge");
+            logger.debug("Applying firewall rules for ip address id=" + ipId + " as a part of vm expunge");
             try {
                 success = success && applyIngressFirewallRules(ipId, _accountMgr.getSystemAccount());
             } catch (ResourceUnavailableException ex) {
-                s_logger.warn("Failed to apply port forwarding rules for ip id=" + ipId);
+                logger.warn("Failed to apply port forwarding rules for ip id=" + ipId);
                 success = false;
             }
         }
@@ -988,7 +986,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
                 createFirewallRule(ip.getId(), acct, rule.getXid(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getProtocol(), rule.getSourceCidrList(),
                         rule.getIcmpCode(), rule.getIcmpType(), rule.getRelated(), FirewallRuleType.System, rule.getNetworkId(), rule.getTrafficType(), true);
             } catch (Exception e) {
-                s_logger.debug("Failed to add system wide firewall rule, due to:" + e.toString());
+                logger.debug("Failed to add system wide firewall rule, due to:" + e.toString());
             }
         }
         return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/guru/ControlNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/ControlNetworkGuru.java b/server/src/com/cloud/network/guru/ControlNetworkGuru.java
index 5e80bea..0392e99 100644
--- a/server/src/com/cloud/network/guru/ControlNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/ControlNetworkGuru.java
@@ -23,7 +23,6 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
-import org.apache.log4j.Logger;
 
 import com.cloud.configuration.Config;
 import com.cloud.dc.DataCenter;
@@ -55,7 +54,6 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = {NetworkGuru.class})
 public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(ControlNetworkGuru.class);
     @Inject
     DataCenterDao _dcDao;
     @Inject
@@ -86,7 +84,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
         if (offering.isSystemOnly() && isMyTrafficType(offering.getTrafficType())) {
             return true;
         } else {
-            s_logger.trace("We only care about System only Control network");
+            logger.trace("We only care about System only Control network");
             return false;
         }
     }
@@ -178,14 +176,14 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
             DataCenterVO dcVo = _dcDao.findById(dcId);
             if (dcVo.getNetworkType() != NetworkType.Basic) {
                 super.release(nic, vm, reservationId);
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug("Released nic: " + nic);
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Released nic: " + nic);
                 }
                 return true;
             } else {
                 nic.deallocate();
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug("Released nic: " + nic);
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Released nic: " + nic);
                 }
                 return true;
             }
@@ -194,8 +192,8 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
         _dcDao.releaseLinkLocalIpAddress(nic.getId(), reservationId);
 
         nic.deallocate();
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Released nic: " + nic);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Released nic: " + nic);
         }
 
         return true;
@@ -233,7 +231,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
             _gateway = NetUtils.getLinkLocalGateway();
         }
 
-        s_logger.info("Control network setup: cidr=" + _cidr + "; gateway = " + _gateway);
+        logger.info("Control network setup: cidr=" + _cidr + "; gateway = " + _gateway);
 
         return true;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/DirectNetworkGuru.java b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
index 9686f80..237d03d 100644
--- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
@@ -22,7 +22,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
-import org.apache.log4j.Logger;
 
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.DataCenter.NetworkType;
@@ -74,7 +73,6 @@ import com.cloud.vm.dao.NicSecondaryIpDao;
 
 @Local(value = {NetworkGuru.class})
 public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(DirectNetworkGuru.class);
 
     @Inject
     DataCenterDao _dcDao;
@@ -121,7 +119,7 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
         if (dc.getNetworkType() == NetworkType.Advanced && isMyTrafficType(offering.getTrafficType()) && offering.getGuestType() == GuestType.Shared) {
             return true;
         } else {
-            s_logger.trace("We only take care of Guest networks of type " + GuestType.Shared);
+            logger.trace("We only take care of Guest networks of type " + GuestType.Shared);
             return false;
         }
     }
@@ -253,7 +251,7 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
                         if (vm.getType() == VirtualMachine.Type.DomainRouter) {
                             Nic placeholderNic = _networkModel.getPlaceholderNicForRouter(network, null);
                             if (placeholderNic == null) {
-                                s_logger.debug("Saving placeholder nic with ip4 address " + nic.getIPv4Address() + " and ipv6 address " + nic.getIPv6Address() +
+                                logger.debug("Saving placeholder nic with ip4 address " + nic.getIPv4Address() + " and ipv6 address " + nic.getIPv6Address() +
                                         " for the network " + network);
                                 _networkMgr.savePlaceholderNic(network, nic.getIPv4Address(), nic.getIPv6Address(), VirtualMachine.Type.DomainRouter);
                             }
@@ -282,8 +280,8 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
     @Override
     @DB
     public void deallocate(final Network network, final NicProfile nic, VirtualMachineProfile vm) {
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
+        if (logger.isDebugEnabled()) {
+            logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
         }
 
         if (nic.getIPv4Address() != null) {
@@ -295,14 +293,14 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
                         // if the ip address a part of placeholder, don't release it
                         Nic placeholderNic = _networkModel.getPlaceholderNicForRouter(network, null);
                         if (placeholderNic != null && placeholderNic.getIPv4Address().equalsIgnoreCase(ip.getAddress().addr())) {
-                            s_logger.debug("Not releasing direct ip " + ip.getId() + " yet as its ip is saved in the placeholder");
+                            logger.debug("Not releasing direct ip " + ip.getId() + " yet as its ip is saved in the placeholder");
                         } else {
                             _ipAddrMgr.markIpAsUnavailable(ip.getId());
                             _ipAddressDao.unassignIpAddress(ip.getId());
                         }
 
                         //unassign nic secondary ip address
-                        s_logger.debug("remove nic " + nic.getId() + " secondary ip ");
+                        logger.debug("remove nic " + nic.getId() + " secondary ip ");
                         List<String> nicSecIps = null;
                         nicSecIps = _nicSecondaryIpDao.getSecondaryIpAddressesForNic(nic.getId());
                         for (String secIp : nicSecIps) {
@@ -338,12 +336,12 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
                     public void doInTransactionWithoutResult(TransactionStatus status) {
                         for (Nic nic : nics) {
                             if (nic.getIPv4Address() != null) {
-                                s_logger.debug("Releasing ip " + nic.getIPv4Address() + " of placeholder nic " + nic);
+                                logger.debug("Releasing ip " + nic.getIPv4Address() + " of placeholder nic " + nic);
                                 IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address());
                                 if (ip != null) {
                                     _ipAddrMgr.markIpAsUnavailable(ip.getId());
                                     _ipAddressDao.unassignIpAddress(ip.getId());
-                                    s_logger.debug("Removing placeholder nic " + nic);
+                                    logger.debug("Removing placeholder nic " + nic);
                                     _nicDao.remove(nic.getId());
                                 }
                             }
@@ -353,7 +351,7 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
             }
             return true;
         }catch (Exception e) {
-            s_logger.error("trash. Exception:" + e.getMessage());
+            logger.error("trash. Exception:" + e.getMessage());
             throw new CloudRuntimeException("trash. Exception:" + e.getMessage(),e);
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
index 26c8015..71f7374 100644
--- a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
@@ -22,7 +22,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
-import org.apache.log4j.Logger;
 
 import com.cloud.configuration.ZoneConfig;
 import com.cloud.dc.DataCenter;
@@ -64,7 +63,6 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = NetworkGuru.class)
 public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(DirectPodBasedNetworkGuru.class);
 
     @Inject
     DataCenterDao _dcDao;
@@ -87,7 +85,7 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
         if (dc.getNetworkType() == NetworkType.Basic && isMyTrafficType(offering.getTrafficType())) {
             return true;
         } else {
-            s_logger.trace("We only take care of Guest Direct Pod based networks");
+            logger.trace("We only take care of Guest Direct Pod based networks");
             return false;
         }
     }
@@ -184,7 +182,7 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
                         if (placeholderNic != null) {
                             IPAddressVO userIp = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), placeholderNic.getIPv4Address());
                             ip = PublicIp.createFromAddrAndVlan(userIp, _vlanDao.findById(userIp.getVlanId()));
-                            s_logger.debug("Nic got an ip address " + placeholderNic.getIPv4Address() + " stored in placeholder nic for the network " + network +
+                            logger.debug("Nic got an ip address " + placeholderNic.getIPv4Address() + " stored in placeholder nic for the network " + network +
                                 " and gateway " + podRangeGateway);
                         }
                     }
@@ -209,7 +207,7 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
                     if (vm.getType() == VirtualMachine.Type.DomainRouter) {
                         Nic placeholderNic = _networkModel.getPlaceholderNicForRouter(network, pod.getId());
                         if (placeholderNic == null) {
-                            s_logger.debug("Saving placeholder nic with ip4 address " + nic.getIPv4Address() + " for the network " + network);
+                            logger.debug("Saving placeholder nic with ip4 address " + nic.getIPv4Address() + " for the network " + network);
                             _networkMgr.savePlaceholderNic(network, nic.getIPv4Address(), null, VirtualMachine.Type.DomainRouter);
                         }
                     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
index b1d1236..f0739ca9 100644
--- a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
@@ -23,7 +23,6 @@ import javax.inject.Inject;
 
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
-import org.apache.log4j.Logger;
 
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.DataCenter.NetworkType;
@@ -67,7 +66,6 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = NetworkGuru.class)
 public class ExternalGuestNetworkGuru extends GuestNetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(ExternalGuestNetworkGuru.class);
     @Inject
     NetworkOrchestrationService _networkMgr;
     @Inject
@@ -98,7 +96,7 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru {
             isMyIsolationMethod(physicalNetwork) && !offering.isSystemOnly()) {
             return true;
         } else {
-            s_logger.trace("We only take care of Guest networks of type   " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
+            logger.trace("We only take care of Guest networks of type   " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
             return false;
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/guru/GuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/GuestNetworkGuru.java b/server/src/com/cloud/network/guru/GuestNetworkGuru.java
index 92613c4..4929335 100644
--- a/server/src/com/cloud/network/guru/GuestNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/GuestNetworkGuru.java
@@ -28,7 +28,6 @@ import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe
 import org.apache.cloudstack.framework.config.ConfigKey;
 import org.apache.cloudstack.framework.config.Configurable;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
-import org.apache.log4j.Logger;
 
 import com.cloud.configuration.Config;
 import com.cloud.dc.DataCenter;
@@ -84,7 +83,6 @@ import com.cloud.vm.dao.NicDao;
 
 @Local(value = NetworkGuru.class)
 public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGuru, Configurable {
-    private static final Logger s_logger = Logger.getLogger(GuestNetworkGuru.class);
 
     @Inject
     protected VpcDao _vpcDao;
@@ -161,7 +159,7 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
         }
         if (methods.isEmpty()) {
             // The empty isolation method is assumed to be VLAN
-            s_logger.debug("Empty physical isolation type for physical network " + physicalNetwork.getUuid());
+            logger.debug("Empty physical isolation type for physical network " + physicalNetwork.getUuid());
             methods = new ArrayList<String>(1);
             methods.add("VLAN".toLowerCase());
         }
@@ -233,8 +231,8 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
     @DB
     public void deallocate(final Network network, final NicProfile nic, final VirtualMachineProfile vm) {
         if (network.getSpecifyIpRanges()) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
+            if (logger.isDebugEnabled()) {
+                logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
             }
 
             final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address());
@@ -430,7 +428,7 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
         }
 
         if ((profile.getBroadcastDomainType() == BroadcastDomainType.Vlan || profile.getBroadcastDomainType() == BroadcastDomainType.Vxlan) && !offering.getSpecifyVlan()) {
-            s_logger.debug("Releasing vnet for the network id=" + profile.getId());
+            logger.debug("Releasing vnet for the network id=" + profile.getId());
             _dcDao.releaseVnet(BroadcastDomainType.getValue(profile.getBroadcastUri()), profile.getDataCenterId(), profile.getPhysicalNetworkId(), profile.getAccountId(),
                     profile.getReservationId());
             ActionEventUtils.onCompletedActionEvent(CallContext.current().getCallingUserId(), profile.getAccountId(), EventVO.LEVEL_INFO, EventTypes.EVENT_ZONE_VLAN_RELEASE,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java b/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
index 2470ea7..249cea5 100644
--- a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
@@ -21,7 +21,6 @@ import java.util.Random;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.dc.Pod;
 import com.cloud.dc.dao.DataCenterDao;
@@ -50,7 +49,6 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = {NetworkGuru.class})
 public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(PodBasedNetworkGuru.class);
     @Inject
     DataCenterDao _dcDao;
     @Inject
@@ -134,7 +132,7 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru {
         nic.setBroadcastUri(null);
         nic.setIsolationUri(null);
 
-        s_logger.debug("Allocated a nic " + nic + " for " + vm);
+        logger.debug("Allocated a nic " + nic + " for " + vm);
     }
 
     @Override
@@ -151,8 +149,8 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru {
 
         nic.deallocate();
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Released nic: " + nic);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Released nic: " + nic);
         }
 
         return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java b/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
index 340c8b1..5aaf155 100644
--- a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
@@ -19,7 +19,6 @@ package com.cloud.network.guru;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.configuration.ConfigurationManager;
 import com.cloud.dc.DataCenter;
@@ -56,7 +55,6 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = NetworkGuru.class)
 public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(PrivateNetworkGuru.class);
     @Inject
     protected ConfigurationManager _configMgr;
     @Inject
@@ -93,7 +91,7 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru {
             offering.isSystemOnly()) {
             return true;
         } else {
-            s_logger.trace("We only take care of system Guest networks of type   " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
+            logger.trace("We only take care of system Guest networks of type   " + GuestType.Isolated + " in zone of type " + NetworkType.Advanced);
             return false;
         }
     }
@@ -140,8 +138,8 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru {
 
     @Override
     public void deallocate(Network network, NicProfile nic, VirtualMachineProfile vm) {
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
+        if (logger.isDebugEnabled()) {
+            logger.debug("Deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
         }
 
         PrivateIpVO ip = _privateIpDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/guru/PublicNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/PublicNetworkGuru.java b/server/src/com/cloud/network/guru/PublicNetworkGuru.java
index 9f855ea..219ba9a 100644
--- a/server/src/com/cloud/network/guru/PublicNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/PublicNetworkGuru.java
@@ -20,7 +20,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
-import org.apache.log4j.Logger;
 
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.Vlan.VlanType;
@@ -60,7 +59,6 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = {NetworkGuru.class})
 public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(PublicNetworkGuru.class);
 
     @Inject
     DataCenterDao _dcDao;
@@ -197,8 +195,8 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
     @Override
     @DB
     public void deallocate(Network network, NicProfile nic, VirtualMachineProfile vm) {
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("public network deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
+        if (logger.isDebugEnabled()) {
+            logger.debug("public network deallocate network: networkId: " + nic.getNetworkId() + ", ip: " + nic.getIPv4Address());
         }
 
         final IPAddressVO ip = _ipAddressDao.findByIpAndSourceNetworkId(nic.getNetworkId(), nic.getIPv4Address());
@@ -213,8 +211,8 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
         }
         nic.deallocate();
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Deallocated nic: " + nic);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Deallocated nic: " + nic);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/guru/StorageNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/StorageNetworkGuru.java b/server/src/com/cloud/network/guru/StorageNetworkGuru.java
index bf21cd7..5f34a36 100644
--- a/server/src/com/cloud/network/guru/StorageNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/StorageNetworkGuru.java
@@ -19,7 +19,6 @@ package com.cloud.network.guru;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
 
 import com.cloud.dc.Pod;
 import com.cloud.dc.StorageNetworkIpAddressVO;
@@ -46,7 +45,6 @@ import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = NetworkGuru.class)
 public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGuru {
-    private static final Logger s_logger = Logger.getLogger(StorageNetworkGuru.class);
     @Inject
     StorageNetworkManager _sNwMgr;
     @Inject
@@ -77,7 +75,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
         if (isMyTrafficType(offering.getTrafficType()) && offering.isSystemOnly()) {
             return true;
         } else {
-            s_logger.trace("It's not storage network offering, skip it.");
+            logger.trace("It's not storage network offering, skip it.");
             return false;
         }
     }
@@ -144,7 +142,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
             nic.setBroadcastUri(null);
         }
         nic.setIsolationUri(null);
-        s_logger.debug("Allocated a storage nic " + nic + " for " + vm);
+        logger.debug("Allocated a storage nic " + nic + " for " + vm);
     }
 
     @Override
@@ -155,7 +153,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
         }
 
         _sNwMgr.releaseIpAddress(nic.getIPv4Address());
-        s_logger.debug("Release an storage ip " + nic.getIPv4Address());
+        logger.debug("Release an storage ip " + nic.getIPv4Address());
         nic.deallocate();
         return true;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java b/server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java
index 84ac061..3e20859 100644
--- a/server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java
@@ -27,7 +27,6 @@ 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;
@@ -44,7 +43,6 @@ import com.cloud.utils.concurrency.NamedThreadFactory;
 @Component
 @Local(value = {LBHealthCheckManager.class})
 public class LBHealthCheckManagerImpl extends ManagerBase implements LBHealthCheckManager, Manager {
-    private static final Logger s_logger = Logger.getLogger(LBHealthCheckManagerImpl.class);
 
     @Inject
     ConfigurationDao _configDao;
@@ -60,8 +58,8 @@ public class LBHealthCheckManagerImpl extends ManagerBase implements LBHealthChe
     @Override
     public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
         _configs = _configDao.getConfiguration("management-server", params);
-        if (s_logger.isInfoEnabled()) {
-            s_logger.info(format("Configuring LBHealthCheck Manager %1$s", name));
+        if (logger.isInfoEnabled()) {
+            logger.info(format("Configuring LBHealthCheck Manager %1$s", name));
         }
         this.name = name;
         _interval = NumbersUtil.parseLong(_configs.get(Config.LBHealthCheck.key()), 600);
@@ -71,14 +69,14 @@ public class LBHealthCheckManagerImpl extends ManagerBase implements LBHealthChe
 
     @Override
     public boolean start() {
-        s_logger.debug("LB HealthCheckmanager is getting Started");
+        logger.debug("LB HealthCheckmanager is getting Started");
         _executor.scheduleAtFixedRate(new UpdateLBHealthCheck(), 10, _interval, TimeUnit.SECONDS);
         return true;
     }
 
     @Override
     public boolean stop() {
-        s_logger.debug("HealthCheckmanager is getting Stopped");
+        logger.debug("HealthCheckmanager is getting Stopped");
         _executor.shutdown();
         return true;
     }
@@ -95,7 +93,7 @@ public class LBHealthCheckManagerImpl extends ManagerBase implements LBHealthChe
                 updateLBHealthCheck(Scheme.Public);
                 updateLBHealthCheck(Scheme.Internal);
             } catch (Exception e) {
-                s_logger.error("Exception in LB HealthCheck Update Checker", e);
+                logger.error("Exception in LB HealthCheck Update Checker", e);
             }
         }
     }
@@ -105,9 +103,9 @@ public class LBHealthCheckManagerImpl extends ManagerBase implements LBHealthChe
         try {
             _lbService.updateLBHealthChecks(scheme);
         } catch (ResourceUnavailableException e) {
-            s_logger.debug("Error while updating the LB HealtCheck ", e);
+            logger.debug("Error while updating the LB HealtCheck ", e);
         }
-        s_logger.debug("LB HealthCheck Manager is running and getting the updates from LB providers and updating service status");
+        logger.debug("LB HealthCheck Manager is running and getting the updates from LB providers and updating service status");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index c03af2d..5ae741d 100644
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -45,7 +45,6 @@ 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.api.to.LoadBalancerTO;
 import com.cloud.configuration.ConfigurationManager;
@@ -170,7 +169,6 @@ import com.google.gson.reflect.TypeToken;
 
 @Local(value = {LoadBalancingRulesManager.class, LoadBalancingRulesService.class})
 public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements LoadBalancingRulesManager, LoadBalancingRulesService {
-    private static final Logger s_logger = Logger.getLogger(LoadBalancingRulesManagerImpl.class);
 
     @Inject
     NetworkOrchestrationService _networkMgr;
@@ -318,7 +316,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         DataCenter zone = _entityMgr.findById(DataCenter.class, vmGroup.getZoneId());
         if (zone == null) {
             // This should never happen, but still a cautious check
-            s_logger.warn("Unable to find zone while packaging AutoScale Vm Group, zoneid: " + vmGroup.getZoneId());
+            logger.warn("Unable to find zone while packaging AutoScale Vm Group, zoneid: " + vmGroup.getZoneId());
             throw new InvalidParameterValueException("Unable to find zone");
         } else {
             if (zone.getNetworkType() == NetworkType.Advanced) {
@@ -364,7 +362,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         List<LoadBalancingRule> rules = Arrays.asList(rule);
 
         if (!applyLbRules(rules, false)) {
-            s_logger.debug("LB rules' autoscale config are not completely applied");
+            logger.debug("LB rules' autoscale config are not completely applied");
             return false;
         }
 
@@ -403,16 +401,16 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         try {
             success = applyAutoScaleConfig(loadBalancer, vmGroup, currentState);
         } catch (ResourceUnavailableException e) {
-            s_logger.warn("Unable to configure AutoScaleVmGroup to the lb rule: " + loadBalancer.getId() + " because resource is unavaliable:", e);
+            logger.warn("Unable to configure AutoScaleVmGroup to the lb rule: " + loadBalancer.getId() + " because resource is unavaliable:", e);
             if (isRollBackAllowedForProvider(loadBalancer)) {
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
-                s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() + " lb state rolback while creating AutoscaleVmGroup");
+                logger.debug("LB Rollback rule id: " + loadBalancer.getId() + " lb state rolback while creating AutoscaleVmGroup");
             }
             throw e;
         } finally {
             if (!success) {
-                s_logger.warn("Failed to configure LB Auto Scale Vm Group with Id:" + vmGroupid);
+                logger.warn("Failed to configure LB Auto Scale Vm Group with Id:" + vmGroupid);
             }
         }
 
@@ -422,15 +420,15 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                     @Override
                     public void doInTransactionWithoutResult(TransactionStatus status) {
                         loadBalancer.setState(FirewallRule.State.Active);
-                        s_logger.debug("LB rule " + loadBalancer.getId() + " state is set to Active");
+                        logger.debug("LB rule " + loadBalancer.getId() + " state is set to Active");
                         _lbDao.persist(loadBalancer);
                         vmGroup.setState(AutoScaleVmGroup.State_Enabled);
                         _autoScaleVmGroupDao.persist(vmGroup);
-                        s_logger.debug("LB Auto Scale Vm Group with Id: " + vmGroupid + " is set to Enabled state.");
+                        logger.debug("LB Auto Scale Vm Group with Id: " + vmGroupid + " is set to Enabled state.");
                     }
                 });
             }
-            s_logger.info("Successfully configured LB Autoscale Vm Group with Id: " + vmGroupid);
+            logger.info("Successfully configured LB Autoscale Vm Group with Id: " + vmGroupid);
         }
         return success;
     }
@@ -637,7 +635,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         Network network = _networkDao.findById(lbRule.getNetworkId());
         Purpose purpose = lbRule.getPurpose();
         if (purpose != Purpose.LoadBalancing) {
-            s_logger.debug("Unable to validate network rules for purpose: " + purpose.toString());
+            logger.debug("Unable to validate network rules for purpose: " + purpose.toString());
             return false;
         }
         for (LoadBalancingServiceProvider ne : _lbProviders) {
@@ -675,12 +673,12 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         try {
             applyLoadBalancerConfig(cmd.getLbRuleId());
         } catch (ResourceUnavailableException e) {
-            s_logger.warn("Unable to apply Stickiness policy to the lb rule: " + cmd.getLbRuleId() + " because resource is unavaliable:", e);
+            logger.warn("Unable to apply Stickiness policy to the lb rule: " + cmd.getLbRuleId() + " because resource is unavaliable:", e);
             if (isRollBackAllowedForProvider(loadBalancer)) {
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
                 deleteLBStickinessPolicy(cmd.getEntityId(), false);
-                s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() + " lb state rolback while creating sticky policy");
+                logger.debug("LB Rollback rule id: " + loadBalancer.getId() + " lb state rolback while creating sticky policy");
             } else {
                 deleteLBStickinessPolicy(cmd.getEntityId(), false);
                 if (oldStickinessPolicyId != 0) {
@@ -691,7 +689,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                         if (backupState.equals(FirewallRule.State.Active))
                             applyLoadBalancerConfig(cmd.getLbRuleId());
                     } catch (ResourceUnavailableException e1) {
-                        s_logger.info("[ignored] applying load balancer config.", e1);
+                        logger.info("[ignored] applying load balancer config.", e1);
                     } finally {
                         loadBalancer.setState(backupState);
                         _lbDao.persist(loadBalancer);
@@ -720,11 +718,11 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         try {
             applyLoadBalancerConfig(cmd.getLbRuleId());
         } catch (ResourceUnavailableException e) {
-            s_logger.warn("Unable to apply healthcheck policy to the lb rule: " + cmd.getLbRuleId() + " because resource is unavaliable:", e);
+            logger.warn("Unable to apply healthcheck policy to the lb rule: " + cmd.getLbRuleId() + " because resource is unavaliable:", e);
             if (isRollBackAllowedForProvider(loadBalancer)) {
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
-                s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() + " lb state rolback while creating healthcheck policy");
+                logger.debug("LB Rollback rule id: " + loadBalancer.getId() + " lb state rolback while creating healthcheck policy");
             }
             deleteLBHealthCheckPolicy(cmd.getEntityId(), false);
             success = false;
@@ -760,11 +758,11 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
             boolean backupStickyState = stickinessPolicy.isRevoke();
             stickinessPolicy.setRevoke(true);
             _lb2stickinesspoliciesDao.persist(stickinessPolicy);
-            s_logger.debug("Set load balancer rule for revoke: rule id " + loadBalancerId + ", stickinesspolicyID " + stickinessPolicyId);
+            logger.debug("Set load balancer rule for revoke: rule id " + loadBalancerId + ", stickinesspolicyID " + stickinessPolicyId);
 
             try {
                 if (!applyLoadBalancerConfig(loadBalancerId)) {
-                    s_logger.warn("Failed to remove load balancer rule id " + loadBalancerId + " for stickinesspolicyID " + stickinessPolicyId);
+                    logger.warn("Failed to remove load balancer rule id " + loadBalancerId + " for stickinesspolicyID " + stickinessPolicyId);
                     throw new CloudRuntimeException("Failed to remove load balancer rule id " + loadBalancerId + " for stickinesspolicyID " + stickinessPolicyId);
                 }
             } catch (ResourceUnavailableException e) {
@@ -773,9 +771,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                     _lb2stickinesspoliciesDao.persist(stickinessPolicy);
                     loadBalancer.setState(backupState);
                     _lbDao.persist(loadBalancer);
-                    s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() + "  while deleting sticky policy: " + stickinessPolicyId);
+                    logger.debug("LB Rollback rule id: " + loadBalancer.getId() + "  while deleting sticky policy: " + stickinessPolicyId);
                 }
-                s_logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
+                logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
                 success = false;
             }
         } else {
@@ -813,7 +811,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
             boolean backupStickyState = healthCheckPolicy.isRevoke();
             healthCheckPolicy.setRevoke(true);
             _lb2healthcheckDao.persist(healthCheckPolicy);
-            s_logger.debug("Set health check policy to revoke for loadbalancing rule id : " + loadBalancerId + ", healthCheckpolicyID " + healthCheckPolicyId);
+            logger.debug("Set health check policy to revoke for loadbalancing rule id : " + loadBalancerId + ", healthCheckpolicyID " + healthCheckPolicyId);
 
             // removing the state of services set by the monitor.
             final List<LoadBalancerVMMapVO> maps = _lb2VmMapDao.listByLoadBalancerId(loadBalancerId);
@@ -821,7 +819,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                 Transaction.execute(new TransactionCallbackNoReturn() {
                     @Override
                     public void doInTransactionWithoutResult(TransactionStatus status) {
-                        s_logger.debug("Resetting health state policy for services in loadbalancing rule id : " + loadBalancerId);
+                        logger.debug("Resetting health state policy for services in loadbalancing rule id : " + loadBalancerId);
                         for (LoadBalancerVMMapVO map : maps) {
                             map.setState(null);
                             _lb2VmMapDao.persist(map);
@@ -832,7 +830,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
             try {
                 if (!applyLoadBalancerConfig(loadBalancerId)) {
-                    s_logger.warn("Failed to remove load balancer rule id " + loadBalancerId + " for healthCheckpolicyID " + healthCheckPolicyId);
+                    logger.warn("Failed to remove load balancer rule id " + loadBalancerId + " for healthCheckpolicyID " + healthCheckPolicyId);
                     throw new CloudRuntimeException("Failed to remove load balancer rule id " + loadBalancerId + " for healthCheckpolicyID " + healthCheckPolicyId);
                 }
             } catch (ResourceUnavailableException e) {
@@ -841,9 +839,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                     _lb2healthcheckDao.persist(healthCheckPolicy);
                     loadBalancer.setState(backupState);
                     _lbDao.persist(loadBalancer);
-                    s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() + "  while deleting healthcheck policy: " + healthCheckPolicyId);
+                    logger.debug("LB Rollback rule id: " + loadBalancer.getId() + "  while deleting healthcheck policy: " + healthCheckPolicyId);
                 }
-                s_logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
+                logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
                 success = false;
             }
         } else {
@@ -867,7 +865,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
             if (capability != null && capability.equalsIgnoreCase("true")) {
                 /*
-                 * s_logger.debug(
+                 * logger.debug(
                  * "HealthCheck Manager :: LB Provider in the Network has the Healthcheck policy capability :: "
                  * + provider.get(0).getName());
                  */
@@ -903,7 +901,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                                             if (dstIp.equalsIgnoreCase(lbto.getDestinations()[i].getDestIp())) {
                                                 lbVmMap.setState(des.getMonitorState());
                                                 _lb2VmMapDao.persist(lbVmMap);
-                                                s_logger.debug("Updating the LB VM Map table with the service state");
+                                                logger.debug("Updating the LB VM Map table with the service state");
                                             }
                                         }
                                     }
@@ -917,7 +915,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                     }
                 }
             } else {
-                // s_logger.debug("HealthCheck Manager :: LB Provider in the Network DNOT the Healthcheck policy capability ");
+                // logger.debug("HealthCheck Manager :: LB Provider in the Network DNOT the Healthcheck policy capability ");
             }
         }
     }
@@ -1079,8 +1077,8 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
             vmIdIpMap.put(instanceId, vmIpsList);
 
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Adding " + vm + " to the load balancer pool");
+            if (logger.isDebugEnabled()) {
+                logger.debug("Adding " + vm + " to the load balancer pool");
             }
             vmsToAdd.add(vm);
         }
@@ -1116,7 +1114,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
             applyLoadBalancerConfig(loadBalancerId);
             success = true;
         } catch (ResourceUnavailableException e) {
-            s_logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
+            logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
             success = false;
         } finally {
             if (!success) {
@@ -1131,7 +1129,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                 });
                 if (!vmInstanceIds.isEmpty()) {
                     _lb2VmMapDao.remove(loadBalancer.getId(), vmInstanceIds, null);
-                    s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() + "  while attaching VM: " + vmInstanceIds);
+                    logger.debug("LB Rollback rule id: " + loadBalancer.getId() + "  while attaching VM: " + vmInstanceIds);
                 }
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
@@ -1150,7 +1148,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
     @Override
     public boolean assignSSLCertToLoadBalancerRule(Long lbId, String certName, String publicCert, String privateKey) {
-        s_logger.error("Calling the manager for LB");
+        logger.error("Calling the manager for LB");
         LoadBalancerVO loadBalancer = _lbDao.findById(lbId);
 
         return false;  //TODO
@@ -1171,7 +1169,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
         SslCertVO certVO = _entityMgr.findById(SslCertVO.class, lbCertMap.getCertId());
         if (certVO == null) {
-            s_logger.warn("Cert rule with cert ID " + lbCertMap.getCertId() + " but Cert is not found");
+            logger.warn("Cert rule with cert ID " + lbCertMap.getCertId() + " but Cert is not found");
             return null;
         }
 
@@ -1233,9 +1231,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                 _lbDao.persist(loadBalancer);
                 LoadBalancerCertMapVO certMap = _lbCertMapDao.findByLbRuleId(lbRuleId);
                 _lbCertMapDao.remove(certMap.getId());
-                s_logger.debug("LB Rollback rule id: " + loadBalancer.getId() + " while adding cert");
+                logger.debug("LB Rollback rule id: " + loadBalancer.getId() + " while adding cert");
             }
-            s_logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
+            logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
         }
         return success;
     }
@@ -1269,7 +1267,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
             _lbCertMapDao.persist(lbCertMap);
 
             if (!applyLoadBalancerConfig(lbRuleId)) {
-                s_logger.warn("Failed to remove cert from load balancer rule id " + lbRuleId);
+                logger.warn("Failed to remove cert from load balancer rule id " + lbRuleId);
                 CloudRuntimeException ex = new CloudRuntimeException("Failed to remove certificate load balancer rule id " + lbRuleId);
                 ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
                 throw ex;
@@ -1281,9 +1279,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                 _lbCertMapDao.persist(lbCertMap);
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
-                s_logger.debug("Rolled back certificate removal lb id " + lbRuleId);
+                logger.debug("Rolled back certificate removal lb id " + lbRuleId);
             }
-            s_logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
+            logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
             if (!success) {
                 CloudRuntimeException ex = new CloudRuntimeException("Failed to remove certificate from load balancer rule id " + lbRuleId);
                 ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
@@ -1347,7 +1345,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                         lbvm.setRevoke(true);
                         _lb2VmMapDao.persist(lbvm);
                     }
-                    s_logger.debug("Set load balancer rule for revoke: rule id " + loadBalancerId + ", vmId " + instanceId);
+                    logger.debug("Set load balancer rule for revoke: rule id " + loadBalancerId + ", vmId " + instanceId);
 
                 } else {
                     for (String vmIp: lbVmIps) {
@@ -1358,7 +1356,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                         }
                         map.setRevoke(true);
                         _lb2VmMapDao.persist(map);
-                        s_logger.debug("Set load balancer rule for revoke: rule id " + loadBalancerId + ", vmId " +
+                        logger.debug("Set load balancer rule for revoke: rule id " + loadBalancerId + ", vmId " +
                                 instanceId + ", vmip " + vmIp);
                     }
                 }
@@ -1374,7 +1372,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
             }
 
             if (!applyLoadBalancerConfig(loadBalancerId)) {
-                s_logger.warn("Failed to remove load balancer rule id " + loadBalancerId + " for vms " + instanceIds);
+                logger.warn("Failed to remove load balancer rule id " + loadBalancerId + " for vms " + instanceIds);
                 CloudRuntimeException ex = new CloudRuntimeException("Failed to remove specified load balancer rule id for vms " + instanceIds);
                 ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
                 throw ex;
@@ -1390,13 +1388,13 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                         LoadBalancerVMMapVO map = _lb2VmMapDao.findByLoadBalancerIdAndVmId(loadBalancerId, instanceId);
                         map.setRevoke(false);
                         _lb2VmMapDao.persist(map);
-                        s_logger.debug("LB Rollback rule id: " + loadBalancerId + ",while removing vmId " + instanceId);
+                        logger.debug("LB Rollback rule id: " + loadBalancerId + ",while removing vmId " + instanceId);
                     }else {
                         for (String vmIp: lbVmIps) {
                             LoadBalancerVMMapVO map = _lb2VmMapDao.findByLoadBalancerIdAndVmIdVmIp (loadBalancerId, instanceId, vmIp);
                             map.setRevoke(true);
                             _lb2VmMapDao.persist(map);
-                            s_logger.debug("LB Rollback rule id: " + loadBalancerId + ",while removing vmId " +
+                            logger.debug("LB Rollback rule id: " + loadBalancerId + ",while removing vmId " +
                                     instanceId + ", vmip " + vmIp);
                         }
                     }
@@ -1404,9 +1402,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
                 loadBalancer.setState(backupState);
                 _lbDao.persist(loadBalancer);
-                s_logger.debug("LB Rollback rule id: " + loadBalancerId + " while removing vm instances");
+                logger.debug("LB Rollback rule id: " + loadBalancerId + " while removing vm instances");
             }
-            s_logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
+            logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
         }
         if (!success) {
             CloudRuntimeException ex = new CloudRuntimeException("Failed to remove specified load balancer rule id for vms " + vmIds);
@@ -1438,7 +1436,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
             map.setRevoke(true);
             _lb2VmMapDao.persist(map);
-            s_logger.debug("Set load balancer rule for revoke: rule id " + map.getLoadBalancerId() + ", vmId " + instanceId);
+            logger.debug("Set load balancer rule for revoke: rule id " + map.getLoadBalancerId() + ", vmId " + instanceId);
         }
 
         // Reapply all lbs that had the vm assigned
@@ -1492,8 +1490,8 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                 boolean generateUsageEvent = false;
 
                 if (lb.getState() == FirewallRule.State.Staged) {
-                    if (s_logger.isDebugEnabled()) {
-                        s_logger.debug("Found a rule that is still in stage state so just removing it: " + lb);
+                    if (logger.isDebugEnabled()) {
+                        logger.debug("Found a rule that is still in stage state so just removing it: " + lb);
                     }
                     generateUsageEvent = true;
                 } else if (lb.getState() == FirewallRule.State.Add || lb.getState() == FirewallRule.State.Active) {
@@ -1507,7 +1505,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                     for (LoadBalancerVMMapVO map : maps) {
                         map.setRevoke(true);
                         _lb2VmMapDao.persist(map);
-                        s_logger.debug("Set load balancer rule for revoke: rule id " + loadBalancerId + ", vmId " + map.getInstanceId());
+                        logger.debug("Set load balancer rule for revoke: rule id " + loadBalancerId + ", vmId " + map.getInstanceId());
                     }
                 }
 
@@ -1539,7 +1537,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         if (apply) {
             try {
                 if (!applyLoadBalancerConfig(loadBalancerId)) {
-                    s_logger.warn("Unable to apply the load balancer config");
+                    logger.warn("Unable to apply the load balancer config");
                     return false;
                 }
             } catch (ResourceUnavailableException e) {
@@ -1547,14 +1545,14 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                     if (backupMaps != null) {
                         for (LoadBalancerVMMapVO map : backupMaps) {
                             _lb2VmMapDao.persist(map);
-                            s_logger.debug("LB Rollback rule id: " + loadBalancerId + ", vmId " + map.getInstanceId());
+                            logger.debug("LB Rollback rule id: " + loadBalancerId + ", vmId " + map.getInstanceId());
                         }
                     }
                     lb.setState(backupState);
                     _lbDao.persist(lb);
-                    s_logger.debug("LB Rollback rule id: " + loadBalancerId + " while deleting LB rule.");
+                    logger.debug("LB Rollback rule id: " + loadBalancerId + " while deleting LB rule.");
                 } else {
-                    s_logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
+                    logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
                 }
                 return false;
             }
@@ -1562,7 +1560,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
         FirewallRuleVO relatedRule = _firewallDao.findByRelatedId(lb.getId());
         if (relatedRule != null) {
-            s_logger.warn("Unable to remove firewall rule id=" + lb.getId() + " as it has related firewall rule id=" + relatedRule.getId() +
+            logger.warn("Unable to remove firewall rule id=" + lb.getId() + " as it has related firewall rule id=" + relatedRule.getId() +
                 "; leaving it in Revoke state");
             return false;
         } else {
@@ -1574,7 +1572,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         // Bug CS-15411 opened to document this
         // _elbMgr.handleDeleteLoadBalancerRule(lb, callerUserId, caller);
 
-        s_logger.debug("Load balancer with id " + lb.getId() + " is removed successfully");
+        logger.debug("Load balancer with id " + lb.getId() + " is removed successfully");
 
         return true;
     }
@@ -1628,7 +1626,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                         // set networkId just for verification purposes
                         _networkModel.checkIpForService(ipVO, Service.Lb, networkId);
 
-                        s_logger.debug("The ip is not associated with the VPC network id=" + networkId + " so assigning");
+                        logger.debug("The ip is not associated with the VPC network id=" + networkId + " so assigning");
                         ipVO = _ipAddrMgr.associateIPToGuestNetwork(ipAddrId, networkId, false);
                         performedIpAssoc = true;
                     }
@@ -1643,7 +1641,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                 result = createPublicLoadBalancer(xId, name, description, srcPortStart, defPortStart, ipVO.getId(), protocol, algorithm, openFirewall, CallContext.current(),
                         lbProtocol, forDisplay);
             } catch (Exception ex) {
-                s_logger.warn("Failed to create load balancer due to ", ex);
+                logger.warn("Failed to create load balancer due to ", ex);
                 if (ex instanceof NetworkRuleConflictException) {
                     throw (NetworkRuleConflictException)ex;
                 }
@@ -1654,7 +1652,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
             } finally {
                 if (result == null && systemIp != null) {
-                    s_logger.debug("Releasing system IP address " + systemIp + " as corresponding lb rule failed to create");
+                    logger.debug("Releasing system IP address " + systemIp + " as corresponding lb rule failed to create");
                     _ipAddrMgr.handleSystemIpRelease(systemIp);
                 }
                 // release ip address if ipassoc was perfored
@@ -1765,7 +1763,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                     if (!_firewallDao.setStateToAdd(newRule)) {
                         throw new CloudRuntimeException("Unable to update the state to add for " + newRule);
                     }
-                    s_logger.debug("Load balancer " + newRule.getId() + " for Ip address id=" + sourceIpId + ", public port " + srcPort + ", private port " + destPort +
+                    logger.debug("Load balancer " + newRule.getId() + " for Ip address id=" + sourceIpId + ", public port " + srcPort + ", private port " + destPort +
                         " is added successfully.");
                     CallContext.current().setEventDetails("Load balancer Id: " + newRule.getId());
                     UsageEventUtils.publishUsageEvent(EventTypes.EVENT_LOAD_BALANCER_CREATE, ipAddr.getAllocatedToAccountId(), ipAddr.getDataCenterId(), newRule.getId(),
@@ -1807,8 +1805,8 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
     @Override
     public boolean revokeLoadBalancersForNetwork(long networkId, Scheme scheme) throws ResourceUnavailableException {
         List<LoadBalancerVO> lbs = _lbDao.listByNetworkIdAndScheme(networkId, scheme);
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Revoking " + lbs.size() + " " + scheme + " load balancing rules for network id=" + networkId);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Revoking " + lbs.size() + " " + scheme + " load balancing rules for network id=" + networkId);
         }
         if (lbs != null) {
             for (LoadBalancerVO lb : lbs) { // called during restart, not persisting state in db
@@ -1816,7 +1814,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
             }
             return applyLoadBalancerRules(lbs, false); // called during restart, not persisting state in db
         } else {
-            s_logger.info("Network id=" + networkId + " doesn't have load balancer rules, nothing to revoke");
+            logger.info("Network id=" + networkId + " doesn't have load balancer rules, nothing to revoke");
             return true;
         }
     }
@@ -1825,10 +1823,10 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
     public boolean applyLoadBalancersForNetwork(long networkId, Scheme scheme) throws ResourceUnavailableException {
         List<LoadBalancerVO> lbs = _lbDao.listByNetworkIdAndScheme(networkId, scheme);
         if (lbs != null) {
-            s_logger.debug("Applying load balancer rules of scheme " + scheme + " in network id=" + networkId);
+            logger.debug("Applying load balancer rules of scheme " + scheme + " in network id=" + networkId);
             return applyLoadBalancerRules(lbs, true);
         } else {
-            s_logger.info("Network id=" + networkId + " doesn't have load balancer rules of scheme " + scheme + ", nothing to apply");
+            logger.info("Network id=" + networkId + " doesn't have load balancer rules of scheme " + scheme + ", nothing to apply");
             return true;
         }
     }
@@ -1878,7 +1876,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         }
 
         if (!applyLbRules(rules, false)) {
-            s_logger.debug("LB rules are not completely applied");
+            logger.debug("LB rules are not completely applied");
             return false;
         }
 
@@ -1891,11 +1889,11 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
                         if (lb.getState() == FirewallRule.State.Revoke) {
                             removeLBRule(lb);
-                            s_logger.debug("LB " + lb.getId() + " is successfully removed");
+                            logger.debug("LB " + lb.getId() + " is successfully removed");
                             checkForReleaseElasticIp = true;
                         } else if (lb.getState() == FirewallRule.State.Add) {
                             lb.setState(FirewallRule.State.Active);
-                            s_logger.debug("LB rule " + lb.getId() + " state is set to Active");
+                            logger.debug("LB rule " + lb.getId() + " state is set to Active");
                             _lbDao.persist(lb);
                         }
 
@@ -1906,7 +1904,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                         for (LoadBalancerVMMapVO lbVmMap : lbVmMaps) {
                             instanceIds.add(lbVmMap.getInstanceId());
                             _lb2VmMapDao.remove(lb.getId(), lbVmMap.getInstanceId(), lbVmMap.getInstanceIp(), null);
-                            s_logger.debug("Load balancer rule id " + lb.getId() + " is removed for vm " +
+                            logger.debug("Load balancer rule id " + lb.getId() + " is removed for vm " +
                                     lbVmMap.getInstanceId() + " instance ip " + lbVmMap.getInstanceIp());
                         }
 
@@ -1914,14 +1912,14 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                         if (_lb2VmMapDao.listByLoadBalancerId(lb.getId()).isEmpty()) {
                             lb.setState(FirewallRule.State.Add);
                             _lbDao.persist(lb);
-                            s_logger.debug("LB rule " + lb.getId() + " state is set to Add as there are no more active LB-VM mappings");
+                            logger.debug("LB rule " + lb.getId() + " state is set to Add as there are no more active LB-VM mappings");
                         }
 
                         // remove LB-Stickiness policy mapping that were state to revoke
                         List<LBStickinessPolicyVO> stickinesspolicies = _lb2stickinesspoliciesDao.listByLoadBalancerId(lb.getId(), true);
                         if (!stickinesspolicies.isEmpty()) {
                             _lb2stickinesspoliciesDao.remove(lb.getId(), true);
-                            s_logger.debug("Load balancer rule id " + lb.getId() + " is removed stickiness policies");
+                            logger.debug("Load balancer rule id " + lb.getId() + " is removed stickiness policies");
                         }
 
                         // remove LB-HealthCheck policy mapping that were state to
@@ -1929,13 +1927,13 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                         List<LBHealthCheckPolicyVO> healthCheckpolicies = _lb2healthcheckDao.listByLoadBalancerId(lb.getId(), true);
                         if (!healthCheckpolicies.isEmpty()) {
                             _lb2healthcheckDao.remove(lb.getId(), true);
-                            s_logger.debug("Load balancer rule id " + lb.getId() + " is removed health check monitors policies");
+                            logger.debug("Load balancer rule id " + lb.getId() + " is removed health check monitors policies");
                         }
 
                         LoadBalancerCertMapVO lbCertMap = _lbCertMapDao.findByLbRuleId(lb.getId());
                         if (lbCertMap != null && lbCertMap.isRevoke()) {
                             _lbCertMapDao.remove(lbCertMap.getId());
-                            s_logger.debug("Load balancer rule id " + lb.getId() + " removed certificate mapping");
+                            logger.debug("Load balancer rule id " + lb.getId() + " removed certificate mapping");
                         }
 
                         return checkForReleaseElasticIp;
@@ -1949,11 +1947,11 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                         try {
                             success = handleSystemLBIpRelease(lb);
                         } catch (Exception ex) {
-                            s_logger.warn("Failed to release system ip as a part of lb rule " + lb + " deletion due to exception ", ex);
+                            logger.warn("Failed to release system ip as a part of lb rule " + lb + " deletion due to exception ", ex);
                             success = false;
                         } finally {
                             if (!success) {
-                                s_logger.warn("Failed to release system ip as a part of lb rule " + lb + " deletion");
+                                logger.warn("Failed to release system ip as a part of lb rule " + lb + " deletion");
                             }
                         }
                     }
@@ -1974,12 +1972,12 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         IpAddress ip = _ipAddressDao.findById(lb.getSourceIpAddressId());
         boolean success = true;
         if (ip.getSystem()) {
-            s_logger.debug("Releasing system ip address " + lb.getSourceIpAddressId() + " as a part of delete lb rule");
+            logger.debug("Releasing system ip address " + lb.getSourceIpAddressId() + " as a part of delete lb rule");
             if (!_ipAddrMgr.disassociatePublicIpAddress(lb.getSourceIpAddressId(), CallContext.current().getCallingUserId(), CallContext.current().getCallingAccount())) {
-                s_logger.warn("Unable to release system ip address id=" + lb.getSourceIpAddressId() + " as a part of delete lb rule");
+                logger.warn("Unable to release system ip address id=" + lb.getSourceIpAddressId() + " as a part of delete lb rule");
                 success = false;
             } else {
-                s_logger.warn("Successfully released system ip address id=" + lb.getSourceIpAddressId() + " as a part of delete lb rule");
+                logger.warn("Successfully released system ip address id=" + lb.getSourceIpAddressId() + " as a part of delete lb rule");
             }
         }
         return success;
@@ -1989,11 +1987,11 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
     public boolean removeAllLoadBalanacersForIp(long ipId, Account caller, long callerUserId) {
         List<FirewallRuleVO> rules = _firewallDao.listByIpAndPurposeAndNotRevoked(ipId, Purpose.LoadBalancing);
         if (rules != null) {
-            s_logger.debug("Found " + rules.size() + " lb rules to cleanup");
+            logger.debug("Found " + rules.size() + " lb rules to cleanup");
             for (FirewallRule rule : rules) {
                 boolean result = deleteLoadBalancerRule(rule.getId(), true, caller, callerUserId, false);
                 if (result == false) {
-                    s_logger.warn("Unable to remove load balancer rule " + rule.getId());
+                    logger.warn("Unable to remove load balancer rule " + rule.getId());
                     return false;
                 }
             }
@@ -2005,11 +2003,11 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
     public boolean removeAllLoadBalanacersForNetwork(long networkId, Account caller, long callerUserId) {
         List<FirewallRuleVO> rules = _firewallDao.listByNetworkAndPurposeAndNotRevoked(networkId, Purpose.LoadBalancing);
         if (rules != null) {
-            s_logger.debug("Found " + rules.size() + " lb rules to cleanup");
+            logger.debug("Found " + rules.size() + " lb rules to cleanup");
             for (FirewallRule rule : rules) {
                 boolean result = deleteLoadBalancerRule(rule.getId(), true, caller, callerUserId, false);
                 if (result == false) {
-                    s_logger.warn("Unable to remove load balancer rule " + rule.getId());
+                    logger.warn("Unable to remove load balancer rule " + rule.getId());
                     return false;
                 }
             }
@@ -2135,9 +2133,9 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
                     _lbDao.update(lb.getId(), lb);
                     _lbDao.persist(lb);
 
-                    s_logger.debug("LB Rollback rule id: " + lbRuleId + " while updating LB rule.");
+                    logger.debug("LB Rollback rule id: " + lbRuleId + " while updating LB rule.");
                 }
-                s_logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
+                logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
                 success = false;
             }
         }
@@ -2172,7 +2170,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
         vmLoadBalancerMappings = _lb2VmMapDao.listByLoadBalancerId(loadBalancerId);
         if(vmLoadBalancerMappings == null) {
             String msg = "no VM Loadbalancer Mapping found";
-            s_logger.error(msg);
+            logger.error(msg);
             throw new CloudRuntimeException(msg);
         }
         Map<Long, String> vmServiceState = new HashMap<Long, String>(vmLoadBalancerMappings.size());
@@ -2414,7 +2412,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
 
     public boolean applyLbRules(List<LoadBalancingRule> rules, boolean continueOnError) throws ResourceUnavailableException {
         if (rules == null || rules.size() == 0) {
-            s_logger.debug("There are no Load Balancing Rules to forward to the network elements");
+            logger.debug("There are no Load Balancing Rules to forward to the network elements");
             return true;
         }
 
@@ -2443,7 +2441,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
             if (!continueOnError) {
                 throw e;
             }
-            s_logger.warn("Problems with applying load balancing rules but pushing on", e);
+            logger.warn("Problems with applying load balancing rules but pushing on", e);
             success = false;
         }
 


Mime
View raw message