http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/server/ManagementServerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 4162bf2..21b24e3 100644 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -514,7 +514,6 @@ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.utils.identity.ManagementServerNode; import org.apache.commons.codec.binary.Base64; -import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.GetVncPortAnswer; @@ -672,7 +671,6 @@ import com.cloud.vm.dao.UserVmDao; import com.cloud.vm.dao.VMInstanceDao; public class ManagementServerImpl extends ManagerBase implements ManagementServer { - public static final Logger s_logger = Logger.getLogger(ManagementServerImpl.class.getName()); @Inject public AccountManager _accountMgr; @@ -887,7 +885,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe @Override public boolean start() { - s_logger.info("Startup CloudStack management server..."); + logger.info("Startup CloudStack management server..."); if (_lockMasterListener == null) { _lockMasterListener = new LockMasterListener(ManagementServerNode.getManagementServerId()); @@ -933,7 +931,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe throw new InvalidParameterValueException("privatePort is an invalid value"); } - // s_logger.debug("Checking if " + privateIp + + // logger.debug("Checking if " + privateIp + // " is a valid private IP address. Guest IP address is: " + // _configs.get("guest.ip.network")); // @@ -1102,8 +1100,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe public Ternary<Pair<List<? extends Host>, Integer>, List<? extends Host>, Map<Host, Boolean>> listHostsForMigrationOfVM(final Long vmId, final Long startIndex, final Long pageSize) { final Account caller = getCaller(); if (!_accountMgr.isRootAdmin(caller.getId())) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Caller is not a root admin, permission denied to migrate the VM"); + if (logger.isDebugEnabled()) { + logger.debug("Caller is not a root admin, permission denied to migrate the VM"); } throw new PermissionDeniedException("No permission to migrate VM, Only Root Admin can migrate a VM!"); } @@ -1115,8 +1113,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe } if (vm.getState() != State.Running) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("VM is not running, cannot migrate the vm" + vm); + if (logger.isDebugEnabled()) { + logger.debug("VM is not running, cannot migrate the vm" + vm); } final InvalidParameterValueException ex = new InvalidParameterValueException("VM is not Running, cannot " + "migrate the vm with specified id"); ex.addProxyObject(vm.getUuid(), "vmId"); @@ -1124,7 +1122,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe } if(_serviceOfferingDetailsDao.findDetail(vm.getServiceOfferingId(), GPU.Keys.pciDevice.toString()) != null) { - s_logger.info(" Live Migration of GPU enabled VM : " + vm.getInstanceName()+ " is not supported"); + logger.info(" Live Migration of GPU enabled VM : " + vm.getInstanceName()+ " is not supported"); // Return empty list. return new Ternary<Pair<List<? extends Host>, Integer>, List<? extends Host>, Map<Host, Boolean>>(new Pair<List <? extends Host>, Integer>(new ArrayList<HostVO>(), new Integer(0)), new ArrayList<Host>(), new HashMap<Host, Boolean>()); @@ -1133,8 +1131,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe if (!vm.getHypervisorType().equals(HypervisorType.XenServer) && !vm.getHypervisorType().equals(HypervisorType.VMware) && !vm.getHypervisorType().equals(HypervisorType.KVM) && !vm.getHypervisorType().equals(HypervisorType.Ovm) && !vm.getHypervisorType().equals(HypervisorType.Hyperv) && !vm.getHypervisorType().equals(HypervisorType.LXC) && !vm.getHypervisorType().equals(HypervisorType.Simulator) && !vm.getHypervisorType().equals(HypervisorType.Ovm3)) { - if (s_logger.isDebugEnabled()) { - s_logger.debug(vm + " is not XenServer/VMware/KVM/Ovm/Hyperv/Ovm3, cannot migrate this VM."); + if (logger.isDebugEnabled()) { + logger.debug(vm + " is not XenServer/VMware/KVM/Ovm/Hyperv/Ovm3, cannot migrate this VM."); } throw new InvalidParameterValueException("Unsupported Hypervisor Type for VM migration, we support " + "XenServer/VMware/KVM/Ovm/Hyperv/Ovm3 only"); } @@ -1146,8 +1144,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe final long srcHostId = vm.getHostId(); final Host srcHost = _hostDao.findById(srcHostId); if (srcHost == null) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Unable to find the host with id: " + srcHostId + " of this VM:" + vm); + if (logger.isDebugEnabled()) { + logger.debug("Unable to find the host with id: " + srcHostId + " of this VM:" + vm); } final InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find the host (with specified id) of VM with specified id"); ex.addProxyObject(String.valueOf(srcHostId), "hostId"); @@ -1212,8 +1210,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe plan = new DataCenterDeployment(srcHost.getDataCenterId(), null, null, null, null, null); } else { final Long cluster = srcHost.getClusterId(); - if (s_logger.isDebugEnabled()) { - s_logger.debug("Searching for all hosts in cluster " + cluster + " for migrating VM " + vm); + if (logger.isDebugEnabled()) { + logger.debug("Searching for all hosts in cluster " + cluster + " for migrating VM " + vm); } allHostsPair = searchForServers(startIndex, pageSize, null, hostType, null, null, null, cluster, null, null, null, null, null, null); // Filter out the current host. @@ -1248,11 +1246,11 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe } } - if (s_logger.isDebugEnabled()) { + if (logger.isDebugEnabled()) { if (suitableHosts.isEmpty()) { - s_logger.debug("No suitable hosts found"); + logger.debug("No suitable hosts found"); } else { - s_logger.debug("Hosts having capacity and suitable for migration: " + suitableHosts); + logger.debug("Hosts having capacity and suitable for migration: " + suitableHosts); } } @@ -1279,8 +1277,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe public Pair<List<? extends StoragePool>, List<? extends StoragePool>> listStoragePoolsForMigrationOfVolume(final Long volumeId) { final Account caller = getCaller(); if (!_accountMgr.isRootAdmin(caller.getId())) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Caller is not a root admin, permission denied to migrate the volume"); + if (logger.isDebugEnabled()) { + logger.debug("Caller is not a root admin, permission denied to migrate the volume"); } throw new PermissionDeniedException("No permission to migrate volume, only root admin can migrate a volume"); } @@ -1298,12 +1296,12 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe // Volume must be in Ready state to be migrated. if (!Volume.State.Ready.equals(volume.getState())) { - s_logger.info("Volume " + volume + " must be in ready state for migration."); + logger.info("Volume " + volume + " must be in ready state for migration."); return new Pair<List<? extends StoragePool>, List<? extends StoragePool>>(allPools, suitablePools); } if (!_volumeMgr.volumeOnSharedStoragePool(volume)) { - s_logger.info("Volume " + volume + " is on local storage. It cannot be migrated to another pool."); + logger.info("Volume " + volume + " is on local storage. It cannot be migrated to another pool."); return new Pair<List<? extends StoragePool>, List<? extends StoragePool>>(allPools, suitablePools); } @@ -1314,11 +1312,11 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe } if (vm == null) { - s_logger.info("Volume " + volume + " isn't attached to any vm. Looking for storage pools in the " + "zone to which this volumes can be migrated."); + logger.info("Volume " + volume + " isn't attached to any vm. Looking for storage pools in the " + "zone to which this volumes can be migrated."); } else if (vm.getState() != State.Running) { - s_logger.info("Volume " + volume + " isn't attached to any running vm. Looking for storage pools in the " + "cluster to which this volumes can be migrated."); + logger.info("Volume " + volume + " isn't attached to any running vm. Looking for storage pools in the " + "cluster to which this volumes can be migrated."); } else { - s_logger.info("Volume " + volume + " is attached to any running vm. Looking for storage pools in the " + "cluster to which this volumes can be migrated."); + logger.info("Volume " + volume + " is attached to any running vm. Looking for storage pools in the " + "cluster to which this volumes can be migrated."); boolean storageMotionSupported = false; // Check if the underlying hypervisor supports storage motion. final Long hostId = vm.getHostId(); @@ -1328,18 +1326,18 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe if (host != null) { capabilities = _hypervisorCapabilitiesDao.findByHypervisorTypeAndVersion(host.getHypervisorType(), host.getHypervisorVersion()); } else { - s_logger.error("Details of the host on which the vm " + vm + ", to which volume " + volume + " is " + "attached, couldn't be retrieved."); + logger.error("Details of the host on which the vm " + vm + ", to which volume " + volume + " is " + "attached, couldn't be retrieved."); } if (capabilities != null) { storageMotionSupported = capabilities.isStorageMotionSupported(); } else { - s_logger.error("Capabilities for host " + host + " couldn't be retrieved."); + logger.error("Capabilities for host " + host + " couldn't be retrieved."); } } if (!storageMotionSupported) { - s_logger.info("Volume " + volume + " is attached to a running vm and the hypervisor doesn't support" + " storage motion."); + logger.info("Volume " + volume + " is attached to a running vm and the hypervisor doesn't support" + " storage motion."); return new Pair<List<? extends StoragePool>, List<? extends StoragePool>>(allPools, suitablePools); } } @@ -1719,10 +1717,10 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe configVo.setValue(key.valueIn(id).toString()); configVOList.add(configVo); } else { - s_logger.warn("ConfigDepot could not find parameter " + param.getName() + " for scope " + scope); + logger.warn("ConfigDepot could not find parameter " + param.getName() + " for scope " + scope); } } else { - s_logger.warn("Configuration item " + param.getName() + " not found in " + scope); + logger.warn("Configuration item " + param.getName() + " not found in " + scope); } } @@ -2224,12 +2222,12 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe @Override public Pair<String, Integer> getVncPort(final VirtualMachine vm) { if (vm.getHostId() == null) { - s_logger.warn("VM " + vm.getHostName() + " does not have host, return -1 for its VNC port"); + logger.warn("VM " + vm.getHostName() + " does not have host, return -1 for its VNC port"); return new Pair<String, Integer>(null, -1); } - if (s_logger.isTraceEnabled()) { - s_logger.trace("Trying to retrieve VNC port from agent about VM " + vm.getHostName()); + if (logger.isTraceEnabled()) { + logger.trace("Trying to retrieve VNC port from agent about VM " + vm.getHostName()); } final GetVncPortAnswer answer = (GetVncPortAnswer)_agentMgr.easySend(vm.getHostId(), new GetVncPortCommand(vm.getId(), vm.getInstanceName())); @@ -3027,30 +3025,30 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe try { final GlobalLock lock = GlobalLock.getInternLock("EventPurge"); if (lock == null) { - s_logger.debug("Couldn't get the global lock"); + logger.debug("Couldn't get the global lock"); return; } if (!lock.lock(30)) { - s_logger.debug("Couldn't lock the db"); + logger.debug("Couldn't lock the db"); return; } try { final Calendar purgeCal = Calendar.getInstance(); purgeCal.add(Calendar.DAY_OF_YEAR, -_purgeDelay); final Date purgeTime = purgeCal.getTime(); - s_logger.debug("Deleting events older than: " + purgeTime.toString()); + logger.debug("Deleting events older than: " + purgeTime.toString()); final List<EventVO> oldEvents = _eventDao.listOlderEvents(purgeTime); - s_logger.debug("Found " + oldEvents.size() + " events to be purged"); + logger.debug("Found " + oldEvents.size() + " events to be purged"); for (final EventVO event : oldEvents) { _eventDao.expunge(event.getId()); } } catch (final Exception e) { - s_logger.error("Exception ", e); + logger.error("Exception ", e); } finally { lock.unlock(); } } catch (final Exception e) { - s_logger.error("Exception ", e); + logger.error("Exception ", e); } } } @@ -3061,30 +3059,30 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe try { final GlobalLock lock = GlobalLock.getInternLock("AlertPurge"); if (lock == null) { - s_logger.debug("Couldn't get the global lock"); + logger.debug("Couldn't get the global lock"); return; } if (!lock.lock(30)) { - s_logger.debug("Couldn't lock the db"); + logger.debug("Couldn't lock the db"); return; } try { final Calendar purgeCal = Calendar.getInstance(); purgeCal.add(Calendar.DAY_OF_YEAR, -_alertPurgeDelay); final Date purgeTime = purgeCal.getTime(); - s_logger.debug("Deleting alerts older than: " + purgeTime.toString()); + logger.debug("Deleting alerts older than: " + purgeTime.toString()); final List<AlertVO> oldAlerts = _alertDao.listOlderAlerts(purgeTime); - s_logger.debug("Found " + oldAlerts.size() + " events to be purged"); + logger.debug("Found " + oldAlerts.size() + " events to be purged"); for (final AlertVO alert : oldAlerts) { _alertDao.expunge(alert.getId()); } } catch (final Exception e) { - s_logger.error("Exception ", e); + logger.error("Exception ", e); } finally { lock.unlock(); } } catch (final Exception e) { - s_logger.error("Exception ", e); + logger.error("Exception ", e); } } } @@ -3291,8 +3289,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe private String signRequest(final String request, final String key) { try { - s_logger.info("Request: " + request); - s_logger.info("Key: " + key); + logger.info("Request: " + request); + logger.info("Key: " + key); if (key != null && request != null) { final Mac mac = Mac.getInstance("HmacSHA1"); @@ -3303,7 +3301,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe return new String(Base64.encodeBase64(encryptedBytes)); } } catch (final Exception ex) { - s_logger.error("unable to sign request", ex); + logger.error("unable to sign request", ex); } return null; } @@ -3336,7 +3334,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe final String input = cloudIdentifier; signature = signRequest(input, secretKey); } catch (final Exception e) { - s_logger.warn("Exception whilst creating a signature:" + e); + logger.warn("Exception whilst creating a signature:" + e); } final ArrayList<String> cloudParams = new ArrayList<String>(); @@ -3751,8 +3749,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe @Override public void doInTransactionWithoutResult(final TransactionStatus status) { for (final HostVO h : hosts) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Changing password for host name = " + h.getName()); + if (logger.isDebugEnabled()) { + logger.debug("Changing password for host name = " + h.getName()); } // update password for this host final DetailVO nv = _detailsDao.findDetail(h.getId(), ApiConstants.USERNAME); @@ -3807,8 +3805,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe Transaction.execute(new TransactionCallbackNoReturn() { @Override public void doInTransactionWithoutResult(final TransactionStatus status) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Changing password for host name = " + host.getName()); + if (logger.isDebugEnabled()) { + logger.debug("Changing password for host name = " + host.getName()); } // update password for this host final DetailVO nv = _detailsDao.findDetail(host.getId(), ApiConstants.USERNAME); @@ -3839,9 +3837,9 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe } return eventTypes; } catch (final IllegalArgumentException e) { - s_logger.error("Error while listing Event Types", e); + logger.error("Error while listing Event Types", e); } catch (final IllegalAccessException e) { - s_logger.error("Error while listing Event Types", e); + logger.error("Error while listing Event Types", e); } return null; } @@ -3974,7 +3972,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe final UserVO adminUser = _userDao.getUser(2); if (adminUser == null) { final String msg = "CANNOT find admin user"; - s_logger.error(msg); + logger.error(msg); throw new CloudRuntimeException(msg); } if (adminUser.getState() == Account.State.disabled) { @@ -3991,7 +3989,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe adminUser.setPassword(encodedPassword); adminUser.setState(Account.State.enabled); _userDao.persist(adminUser); - s_logger.info("Admin user enabled"); + logger.info("Admin user enabled"); } } @@ -4008,8 +4006,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe @Override public void cleanupVMReservations() { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Processing cleanupVMReservations"); + if (logger.isDebugEnabled()) { + logger.debug("Processing cleanupVMReservations"); } _dpMgr.cleanupVMReservations();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/server/StatsCollector.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/server/StatsCollector.java b/server/src/com/cloud/server/StatsCollector.java index 9f3c8cb..0be8af6 100644 --- a/server/src/com/cloud/server/StatsCollector.java +++ b/server/src/com/cloud/server/StatsCollector.java @@ -34,7 +34,6 @@ import java.util.concurrent.TimeUnit; import javax.inject.Inject; import org.apache.cloudstack.utils.usage.UsageUtils; -import org.apache.log4j.Logger; import org.springframework.stereotype.Component; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; @@ -139,7 +138,6 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc } } - public static final Logger s_logger = Logger.getLogger(StatsCollector.class.getName()); private static StatsCollector s_instance = null; @@ -268,7 +266,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc try { externalStatsType = externalStatsProtocol.valueOf(scheme.toUpperCase()); } catch (IllegalArgumentException e) { - s_logger.info(scheme + " is not a valid protocol for external statistics. No statistics will be send."); + logger.info(scheme + " is not a valid protocol for external statistics. No statistics will be send."); } externalStatsHost = uri.getHost(); @@ -284,7 +282,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc externalStatsEnabled = true; } catch (URISyntaxException e) { - s_logger.debug("Failed to parse external statistics URI: " + e.getMessage()); + logger.debug("Failed to parse external statistics URI: " + e.getMessage()); } } @@ -346,7 +344,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc _dailyOrHourly = false; } if (_usageAggregationRange < UsageUtils.USAGE_AGGREGATION_RANGE_MIN) { - s_logger.warn("Usage stats job aggregation range is to small, using the minimum value of " + UsageUtils.USAGE_AGGREGATION_RANGE_MIN); + logger.warn("Usage stats job aggregation range is to small, using the minimum value of " + UsageUtils.USAGE_AGGREGATION_RANGE_MIN); _usageAggregationRange = UsageUtils.USAGE_AGGREGATION_RANGE_MIN; } _diskStatsUpdateExecutor.scheduleAtFixedRate(new VmDiskStatsUpdaterTask(), (endDate - System.currentTimeMillis()), (_usageAggregationRange * 60 * 1000), @@ -358,7 +356,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc @Override protected void runInContext() { try { - s_logger.debug("HostStatsCollector is running..."); + logger.debug("HostStatsCollector is running..."); SearchCriteria<HostVO> sc = _hostDao.createSearchCriteria(); sc.addAnd("status", SearchCriteria.Op.EQ, Status.Up.toString()); @@ -381,7 +379,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc if (stats != null) { hostStats.put(host.getId(), stats); } else { - s_logger.warn("Received invalid host stats for host: " + host.getId()); + logger.warn("Received invalid host stats for host: " + host.getId()); } } _hostStats = hostStats; @@ -405,7 +403,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc } hostIds = _hostGpuGroupsDao.listHostIds(); } catch (Throwable t) { - s_logger.error("Error trying to retrieve host stats", t); + logger.error("Error trying to retrieve host stats", t); } } } @@ -414,7 +412,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc @Override protected void runInContext() { try { - s_logger.debug("VmStatsCollector is running..."); + logger.debug("VmStatsCollector is running..."); SearchCriteria<HostVO> sc = _hostDao.createSearchCriteria(); sc.addAnd("status", SearchCriteria.Op.EQ, Status.Up.toString()); @@ -498,13 +496,13 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc externalStatsPort = 2003; } - s_logger.debug("Sending VmStats of host " + host.getId() + " to Graphite host " + externalStatsHost + ":" + externalStatsPort); + logger.debug("Sending VmStats of host " + host.getId() + " to Graphite host " + externalStatsHost + ":" + externalStatsPort); try { GraphiteClient g = new GraphiteClient(externalStatsHost, externalStatsPort); g.sendMetrics(metrics); } catch (GraphiteException e) { - s_logger.debug("Failed sending VmStats to Graphite host " + externalStatsHost + ":" + externalStatsPort + ": " + e.getMessage()); + logger.debug("Failed sending VmStats to Graphite host " + externalStatsHost + ":" + externalStatsPort + ": " + e.getMessage()); } metrics.clear(); @@ -513,13 +511,13 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc } } catch (Exception e) { - s_logger.debug("Failed to get VM stats for host with ID: " + host.getId()); + logger.debug("Failed to get VM stats for host with ID: " + host.getId()); continue; } } } catch (Throwable t) { - s_logger.error("Error trying to retrieve VM stats", t); + logger.error("Error trying to retrieve VM stats", t); } } } @@ -538,7 +536,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc //msHost in UP state with min id should run the job ManagementServerHostVO msHost = _msHostDao.findOneInUpState(new Filter(ManagementServerHostVO.class, "id", true, 0L, 1L)); if (msHost == null || (msHost.getMsid() != mgmtSrvrId)) { - s_logger.debug("Skipping aggregate disk stats update"); + logger.debug("Skipping aggregate disk stats update"); scanLock.unlock(); return; } @@ -558,17 +556,17 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc _vmDiskStatsDao.update(stat.getId(), stat); } } - s_logger.debug("Successfully updated aggregate vm disk stats"); + logger.debug("Successfully updated aggregate vm disk stats"); } }); } catch (Exception e) { - s_logger.debug("Failed to update aggregate disk stats", e); + logger.debug("Failed to update aggregate disk stats", e); } finally { scanLock.unlock(); } } } catch (Exception e) { - s_logger.debug("Exception while trying to acquire disk stats lock", e); + logger.debug("Exception while trying to acquire disk stats lock", e); } finally { scanLock.releaseRef(); } @@ -623,12 +621,12 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc if ((vmDiskStat.getBytesRead() == 0) && (vmDiskStat.getBytesWrite() == 0) && (vmDiskStat.getIORead() == 0) && (vmDiskStat.getIOWrite() == 0)) { - s_logger.debug("IO/bytes read and write are all 0. Not updating vm_disk_statistics"); + logger.debug("IO/bytes read and write are all 0. Not updating vm_disk_statistics"); continue; } if (vmDiskStat_lock == null) { - s_logger.warn("unable to find vm disk stats from host for account: " + userVm.getAccountId() + " with vmId: " + userVm.getId() + + logger.warn("unable to find vm disk stats from host for account: " + userVm.getAccountId() + " with vmId: " + userVm.getId() + " and volumeId:" + volume.getId()); continue; } @@ -637,15 +635,15 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc ((previousVmDiskStats.getCurrentBytesRead() != vmDiskStat_lock.getCurrentBytesRead()) || (previousVmDiskStats.getCurrentBytesWrite() != vmDiskStat_lock.getCurrentBytesWrite()) || (previousVmDiskStats.getCurrentIORead() != vmDiskStat_lock.getCurrentIORead()) || (previousVmDiskStats.getCurrentIOWrite() != vmDiskStat_lock.getCurrentIOWrite()))) { - s_logger.debug("vm disk stats changed from the time GetVmDiskStatsCommand was sent. " + "Ignoring current answer. Host: " + + logger.debug("vm disk stats changed from the time GetVmDiskStatsCommand was sent. " + "Ignoring current answer. Host: " + host.getName() + " . VM: " + vmDiskStat.getVmName() + " Read(Bytes): " + vmDiskStat.getBytesRead() + " write(Bytes): " + vmDiskStat.getBytesWrite() + " Read(IO): " + vmDiskStat.getIORead() + " write(IO): " + vmDiskStat.getIOWrite()); continue; } if (vmDiskStat_lock.getCurrentBytesRead() > vmDiskStat.getBytesRead()) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Read # of bytes that's less than the last one. " + + if (logger.isDebugEnabled()) { + logger.debug("Read # of bytes that's less than the last one. " + "Assuming something went wrong and persisting it. Host: " + host.getName() + " . VM: " + vmDiskStat.getVmName() + " Reported: " + vmDiskStat.getBytesRead() + " Stored: " + vmDiskStat_lock.getCurrentBytesRead()); } @@ -653,8 +651,8 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc } vmDiskStat_lock.setCurrentBytesRead(vmDiskStat.getBytesRead()); if (vmDiskStat_lock.getCurrentBytesWrite() > vmDiskStat.getBytesWrite()) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Write # of bytes that's less than the last one. " + + if (logger.isDebugEnabled()) { + logger.debug("Write # of bytes that's less than the last one. " + "Assuming something went wrong and persisting it. Host: " + host.getName() + " . VM: " + vmDiskStat.getVmName() + " Reported: " + vmDiskStat.getBytesWrite() + " Stored: " + vmDiskStat_lock.getCurrentBytesWrite()); } @@ -662,8 +660,8 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc } vmDiskStat_lock.setCurrentBytesWrite(vmDiskStat.getBytesWrite()); if (vmDiskStat_lock.getCurrentIORead() > vmDiskStat.getIORead()) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Read # of IO that's less than the last one. " + "Assuming something went wrong and persisting it. Host: " + + if (logger.isDebugEnabled()) { + logger.debug("Read # of IO that's less than the last one. " + "Assuming something went wrong and persisting it. Host: " + host.getName() + " . VM: " + vmDiskStat.getVmName() + " Reported: " + vmDiskStat.getIORead() + " Stored: " + vmDiskStat_lock.getCurrentIORead()); } @@ -671,8 +669,8 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc } vmDiskStat_lock.setCurrentIORead(vmDiskStat.getIORead()); if (vmDiskStat_lock.getCurrentIOWrite() > vmDiskStat.getIOWrite()) { - if (s_logger.isDebugEnabled()) { - s_logger.debug("Write # of IO that's less than the last one. " + "Assuming something went wrong and persisting it. Host: " + + if (logger.isDebugEnabled()) { + logger.debug("Write # of IO that's less than the last one. " + "Assuming something went wrong and persisting it. Host: " + host.getName() + " . VM: " + vmDiskStat.getVmName() + " Reported: " + vmDiskStat.getIOWrite() + " Stored: " + vmDiskStat_lock.getCurrentIOWrite()); } @@ -695,7 +693,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc } }); } catch (Exception e) { - s_logger.warn("Error while collecting vm disk stats from hosts", e); + logger.warn("Error while collecting vm disk stats from hosts", e); } } } @@ -704,8 +702,8 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc @Override protected void runInContext() { try { - if (s_logger.isDebugEnabled()) { - s_logger.debug("StorageCollector is running..."); + if (logger.isDebugEnabled()) { + logger.debug("StorageCollector is running..."); } List<DataStore> stores = _dataStoreMgr.listImageStores(); @@ -718,14 +716,14 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc GetStorageStatsCommand command = new GetStorageStatsCommand(store.getTO()); EndPoint ssAhost = _epSelector.select(store); if (ssAhost == null) { - s_logger.debug("There is no secondary storage VM for secondary storage host " + store.getName()); + logger.debug("There is no secondary storage VM for secondary storage host " + store.getName()); continue; } long storeId = store.getId(); Answer answer = ssAhost.sendMessage(command); if (answer != null && answer.getResult()) { storageStats.put(storeId, (StorageStats)answer); - s_logger.trace("HostId: " + storeId + " Used: " + ((StorageStats)answer).getByteUsed() + " Total Available: " + + logger.trace("HostId: " + storeId + " Used: " + ((StorageStats)answer).getByteUsed() + " Total Available: " + ((StorageStats)answer).getCapacityBytes()); } } @@ -752,14 +750,14 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc } } } catch (StorageUnavailableException e) { - s_logger.info("Unable to reach " + pool, e); + logger.info("Unable to reach " + pool, e); } catch (Exception e) { - s_logger.warn("Unable to get stats for " + pool, e); + logger.warn("Unable to get stats for " + pool, e); } } _storagePoolStats = storagePoolStats; } catch (Throwable t) { - s_logger.error("Error trying to retrieve storage stats", t); + logger.error("Error trying to retrieve storage stats", t); } } } @@ -768,8 +766,8 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc @Override protected void runInContext() { try { - if (s_logger.isDebugEnabled()) { - s_logger.debug("AutoScaling Monitor is running..."); + if (logger.isDebugEnabled()) { + logger.debug("AutoScaling Monitor is running..."); } // list all AS VMGroups List<AutoScaleVmGroupVO> asGroups = _asGroupDao.listAll(); @@ -796,8 +794,8 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc _asGroupDao.persist(asGroup); // collect RRDs data for this group - if (s_logger.isDebugEnabled()) { - s_logger.debug("[AutoScale] Collecting RRDs data..."); + if (logger.isDebugEnabled()) { + logger.debug("[AutoScale] Collecting RRDs data..."); } Map<String, String> params = new HashMap<String, String>(); List<AutoScaleVmGroupVmMapVO> asGroupVmVOs = _asGroupVmDao.listByGroup(asGroup.getId()); @@ -838,10 +836,10 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc try { Answer answer = _agentMgr.send(receiveHost, perfMon); if (answer == null || !answer.getResult()) { - s_logger.debug("Failed to send data to node !"); + logger.debug("Failed to send data to node !"); } else { String result = answer.getDetails(); - s_logger.debug("[AutoScale] RRDs collection answer: " + result); + logger.debug("[AutoScale] RRDs collection answer: " + result); HashMap<Long, Double> avgCounter = new HashMap<Long, Double>(); // extract data @@ -887,7 +885,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc String scaleAction = getAutoscaleAction(avgCounter, asGroup.getId(), currentVM, params); if (scaleAction != null) { - s_logger.debug("[AutoScale] Doing scale action: " + scaleAction + " for group " + asGroup.getId()); + logger.debug("[AutoScale] Doing scale action: " + scaleAction + " for group " + asGroup.getId()); if (scaleAction.equals("scaleup")) { _asManager.doScaleUp(asGroup.getId(), 1); } else { @@ -905,7 +903,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc } } catch (Throwable t) { - s_logger.error("Error trying to monitor autoscaling", t); + logger.error("Error trying to monitor autoscaling", t); } } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/storage/ImageStoreUploadMonitorImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/storage/ImageStoreUploadMonitorImpl.java b/server/src/com/cloud/storage/ImageStoreUploadMonitorImpl.java index 167f19f..19ce9f0 100755 --- a/server/src/com/cloud/storage/ImageStoreUploadMonitorImpl.java +++ b/server/src/com/cloud/storage/ImageStoreUploadMonitorImpl.java @@ -28,7 +28,6 @@ import javax.naming.ConfigurationException; import com.cloud.configuration.Resource; import com.cloud.user.ResourceLimitService; -import org.apache.log4j.Logger; import org.springframework.stereotype.Component; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; @@ -78,7 +77,6 @@ import com.cloud.utils.fsm.StateMachine2; @Local(value = {ImageStoreUploadMonitor.class}) public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageStoreUploadMonitor, Listener, Configurable { - static final Logger s_logger = Logger.getLogger(ImageStoreUploadMonitorImpl.class); @Inject private VolumeDao _volumeDao; @@ -186,12 +184,12 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto DataStore dataStore = storeMgr.getDataStore(volumeDataStore.getDataStoreId(), DataStoreRole.Image); EndPoint ep = _epSelector.select(dataStore, volumeDataStore.getExtractUrl()); if (ep == null) { - s_logger.warn("There is no secondary storage VM for image store " + dataStore.getName()); + logger.warn("There is no secondary storage VM for image store " + dataStore.getName()); continue; } VolumeVO volume = _volumeDao.findById(volumeDataStore.getVolumeId()); if (volume == null) { - s_logger.warn("Volume with id " + volumeDataStore.getVolumeId() + " not found"); + logger.warn("Volume with id " + volumeDataStore.getVolumeId() + " not found"); continue; } Host host = _hostDao.findById(ep.getId()); @@ -202,11 +200,11 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto try { answer = ep.sendMessage(cmd); } catch (CloudRuntimeException e) { - s_logger.warn("Unable to get upload status for volume " + volume.getUuid() + ". Error details: " + e.getMessage()); + logger.warn("Unable to get upload status for volume " + volume.getUuid() + ". Error details: " + e.getMessage()); answer = new UploadStatusAnswer(cmd, UploadStatus.UNKNOWN, e.getMessage()); } if (answer == null || !(answer instanceof UploadStatusAnswer)) { - s_logger.warn("No or invalid answer corresponding to UploadStatusCommand for volume " + volumeDataStore.getVolumeId()); + logger.warn("No or invalid answer corresponding to UploadStatusCommand for volume " + volumeDataStore.getVolumeId()); continue; } handleVolumeStatusResponse((UploadStatusAnswer)answer, volume, volumeDataStore); @@ -216,9 +214,9 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto handleVolumeStatusResponse(new UploadStatusAnswer(cmd, UploadStatus.ERROR, error), volume, volumeDataStore); } } catch (Throwable th) { - s_logger.warn("Exception while checking status for uploaded volume " + volumeDataStore.getExtractUrl() + ". Error details: " + th.getMessage()); - if (s_logger.isTraceEnabled()) { - s_logger.trace("Exception details: ", th); + logger.warn("Exception while checking status for uploaded volume " + volumeDataStore.getExtractUrl() + ". Error details: " + th.getMessage()); + if (logger.isTraceEnabled()) { + logger.trace("Exception details: ", th); } } } @@ -230,12 +228,12 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto DataStore dataStore = storeMgr.getDataStore(templateDataStore.getDataStoreId(), DataStoreRole.Image); EndPoint ep = _epSelector.select(dataStore, templateDataStore.getExtractUrl()); if (ep == null) { - s_logger.warn("There is no secondary storage VM for image store " + dataStore.getName()); + logger.warn("There is no secondary storage VM for image store " + dataStore.getName()); continue; } VMTemplateVO template = _templateDao.findById(templateDataStore.getTemplateId()); if (template == null) { - s_logger.warn("Template with id " + templateDataStore.getTemplateId() + " not found"); + logger.warn("Template with id " + templateDataStore.getTemplateId() + " not found"); continue; } Host host = _hostDao.findById(ep.getId()); @@ -246,11 +244,11 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto try { answer = ep.sendMessage(cmd); } catch (CloudRuntimeException e) { - s_logger.warn("Unable to get upload status for template " + template.getUuid() + ". Error details: " + e.getMessage()); + logger.warn("Unable to get upload status for template " + template.getUuid() + ". Error details: " + e.getMessage()); answer = new UploadStatusAnswer(cmd, UploadStatus.UNKNOWN, e.getMessage()); } if (answer == null || !(answer instanceof UploadStatusAnswer)) { - s_logger.warn("No or invalid answer corresponding to UploadStatusCommand for template " + templateDataStore.getTemplateId()); + logger.warn("No or invalid answer corresponding to UploadStatusCommand for template " + templateDataStore.getTemplateId()); continue; } handleTemplateStatusResponse((UploadStatusAnswer)answer, template, templateDataStore); @@ -260,9 +258,9 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto handleTemplateStatusResponse(new UploadStatusAnswer(cmd, UploadStatus.ERROR, error), template, templateDataStore); } } catch (Throwable th) { - s_logger.warn("Exception while checking status for uploaded template " + templateDataStore.getExtractUrl() + ". Error details: " + th.getMessage()); - if (s_logger.isTraceEnabled()) { - s_logger.trace("Exception details: ", th); + logger.warn("Exception while checking status for uploaded template " + templateDataStore.getExtractUrl() + ". Error details: " + th.getMessage()); + if (logger.isTraceEnabled()) { + logger.trace("Exception details: ", th); } } } @@ -291,8 +289,8 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto stateMachine.transitTo(tmpVolume, Event.OperationSucceeded, null, _volumeDao); _resourceLimitMgr.incrementResourceCount(volume.getAccountId(), Resource.ResourceType.secondary_storage, answer.getVirtualSize()); - if (s_logger.isDebugEnabled()) { - s_logger.debug("Volume " + tmpVolume.getUuid() + " uploaded successfully"); + if (logger.isDebugEnabled()) { + logger.debug("Volume " + tmpVolume.getUuid() + " uploaded successfully"); } break; case IN_PROGRESS: @@ -305,8 +303,8 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto tmpVolumeDataStore.setDownloadState(VMTemplateStorageResourceAssoc.Status.DOWNLOAD_ERROR); tmpVolumeDataStore.setState(State.Failed); stateMachine.transitTo(tmpVolume, Event.OperationFailed, null, _volumeDao); - if (s_logger.isDebugEnabled()) { - s_logger.debug("Volume " + tmpVolume.getUuid() + " failed to upload due to operation timed out"); + if (logger.isDebugEnabled()) { + logger.debug("Volume " + tmpVolume.getUuid() + " failed to upload due to operation timed out"); } } else { tmpVolumeDataStore.setDownloadPercent(answer.getDownloadPercent()); @@ -317,8 +315,8 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto tmpVolumeDataStore.setDownloadState(VMTemplateStorageResourceAssoc.Status.DOWNLOAD_ERROR); tmpVolumeDataStore.setState(State.Failed); stateMachine.transitTo(tmpVolume, Event.OperationFailed, null, _volumeDao); - if (s_logger.isDebugEnabled()) { - s_logger.debug("Volume " + tmpVolume.getUuid() + " failed to upload. Error details: " + answer.getDetails()); + if (logger.isDebugEnabled()) { + logger.debug("Volume " + tmpVolume.getUuid() + " failed to upload. Error details: " + answer.getDetails()); } break; case UNKNOWN: @@ -327,8 +325,8 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto tmpVolumeDataStore.setDownloadState(VMTemplateStorageResourceAssoc.Status.ABANDONED); tmpVolumeDataStore.setState(State.Failed); stateMachine.transitTo(tmpVolume, Event.OperationTimeout, null, _volumeDao); - if (s_logger.isDebugEnabled()) { - s_logger.debug("Volume " + tmpVolume.getUuid() + " failed to upload due to operation timed out"); + if (logger.isDebugEnabled()) { + logger.debug("Volume " + tmpVolume.getUuid() + " failed to upload due to operation timed out"); } } } @@ -336,7 +334,7 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto } _volumeDataStoreDao.update(tmpVolumeDataStore.getId(), tmpVolumeDataStore); } catch (NoTransitionException e) { - s_logger.error("Unexpected error " + e.getMessage()); + logger.error("Unexpected error " + e.getMessage()); } } }); @@ -366,8 +364,8 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto stateMachine.transitTo(tmpTemplate, VirtualMachineTemplate.Event.OperationSucceeded, null, _templateDao); _resourceLimitMgr.incrementResourceCount(template.getAccountId(), Resource.ResourceType.secondary_storage, answer.getVirtualSize()); - if (s_logger.isDebugEnabled()) { - s_logger.debug("Template " + tmpTemplate.getUuid() + " uploaded successfully"); + if (logger.isDebugEnabled()) { + logger.debug("Template " + tmpTemplate.getUuid() + " uploaded successfully"); } break; case IN_PROGRESS: @@ -380,8 +378,8 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto tmpTemplateDataStore.setDownloadState(VMTemplateStorageResourceAssoc.Status.DOWNLOAD_ERROR); tmpTemplateDataStore.setState(State.Failed); stateMachine.transitTo(tmpTemplate, VirtualMachineTemplate.Event.OperationFailed, null, _templateDao); - if (s_logger.isDebugEnabled()) { - s_logger.debug("Template " + tmpTemplate.getUuid() + " failed to upload due to operation timed out"); + if (logger.isDebugEnabled()) { + logger.debug("Template " + tmpTemplate.getUuid() + " failed to upload due to operation timed out"); } } else { tmpTemplateDataStore.setDownloadPercent(answer.getDownloadPercent()); @@ -392,8 +390,8 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto tmpTemplateDataStore.setDownloadState(VMTemplateStorageResourceAssoc.Status.DOWNLOAD_ERROR); tmpTemplateDataStore.setState(State.Failed); stateMachine.transitTo(tmpTemplate, VirtualMachineTemplate.Event.OperationFailed, null, _templateDao); - if (s_logger.isDebugEnabled()) { - s_logger.debug("Template " + tmpTemplate.getUuid() + " failed to upload. Error details: " + answer.getDetails()); + if (logger.isDebugEnabled()) { + logger.debug("Template " + tmpTemplate.getUuid() + " failed to upload. Error details: " + answer.getDetails()); } break; case UNKNOWN: @@ -402,8 +400,8 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto tmpTemplateDataStore.setDownloadState(VMTemplateStorageResourceAssoc.Status.ABANDONED); tmpTemplateDataStore.setState(State.Failed); stateMachine.transitTo(tmpTemplate, VirtualMachineTemplate.Event.OperationTimeout, null, _templateDao); - if (s_logger.isDebugEnabled()) { - s_logger.debug("Template " + tmpTemplate.getUuid() + " failed to upload due to operation timed out"); + if (logger.isDebugEnabled()) { + logger.debug("Template " + tmpTemplate.getUuid() + " failed to upload due to operation timed out"); } } } @@ -411,7 +409,7 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto } _templateDataStoreDao.update(tmpTemplateDataStore.getId(), tmpTemplateDataStore); } catch (NoTransitionException e) { - s_logger.error("Unexpected error " + e.getMessage()); + logger.error("Unexpected error " + e.getMessage()); } } }); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3818257a/server/src/com/cloud/storage/OCFS2ManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/storage/OCFS2ManagerImpl.java b/server/src/com/cloud/storage/OCFS2ManagerImpl.java index 017ce7f..ff24947 100644 --- a/server/src/com/cloud/storage/OCFS2ManagerImpl.java +++ b/server/src/com/cloud/storage/OCFS2ManagerImpl.java @@ -25,7 +25,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.storage.datastore.db.PrimaryDataStoreDao; @@ -55,7 +54,6 @@ import com.cloud.utils.exception.CloudRuntimeException; @Component @Local(value = {OCFS2Manager.class}) public class OCFS2ManagerImpl extends ManagerBase implements OCFS2Manager, ResourceListener { - private static final Logger s_logger = Logger.getLogger(OCFS2ManagerImpl.class); @Inject ClusterDetailsDao _clusterDetailsDao; @@ -109,11 +107,11 @@ public class OCFS2ManagerImpl extends ManagerBase implements OCFS2Manager, Resou for (HostVO h : hosts) { Answer ans = _agentMgr.easySend(h.getId(), cmd); if (ans == null) { - s_logger.debug("Host " + h.getId() + " is not in UP state, skip preparing OCFS2 node on it"); + logger.debug("Host " + h.getId() + " is not in UP state, skip preparing OCFS2 node on it"); continue; } if (!ans.getResult()) { - s_logger.warn("PrepareOCFS2NodesCommand failed on host " + h.getId() + " " + ans.getDetails()); + logger.warn("PrepareOCFS2NodesCommand failed on host " + h.getId() + " " + ans.getDetails()); return false; } } @@ -154,7 +152,7 @@ public class OCFS2ManagerImpl extends ManagerBase implements OCFS2Manager, Resou sc.and(sc.entity().getType(), Op.EQ, Host.Type.Routing); List<HostVO> hosts = sc.list(); if (hosts.isEmpty()) { - s_logger.debug("There is no host in cluster " + clusterId + ", no need to prepare OCFS2 nodes"); + logger.debug("There is no host in cluster " + clusterId + ", no need to prepare OCFS2 nodes"); return true; } @@ -202,10 +200,10 @@ public class OCFS2ManagerImpl extends ManagerBase implements OCFS2Manager, Resou if (hasOcfs2) { try { if (!prepareNodes(host.getClusterId())) { - s_logger.warn(errMsg); + logger.warn(errMsg); } } catch (Exception e) { - s_logger.error(errMsg, e); + logger.error(errMsg, e); } } }
