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