use vm instance name in log

This commit is contained in:
Anthony Xu 2014-03-24 16:23:56 -07:00
parent bf48309e14
commit 726dd16daa
2 changed files with 5 additions and 5 deletions

View File

@ -267,12 +267,12 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai
for (VMInstanceVO vm : vms) {
if (s_logger.isDebugEnabled()) {
s_logger.debug("Notifying HA Mgr of to restart vm " + vm.getId() + "-" + vm.getHostName());
s_logger.debug("Notifying HA Mgr of to restart vm " + vm.getId() + "-" + vm.getInstanceName());
}
vm = _instanceDao.findByUuid(vm.getUuid());
Long hostId = vm.getHostId();
if ( hostId != null && !hostId.equals(host.getId()) ) {
s_logger.debug("VM " + vm.getHostName() + " is not on down host " + host.getId() + " it is on other host "
s_logger.debug("VM " + vm.getInstanceName() + " is not on down host " + host.getId() + " it is on other host "
+ hostId + " VM HA is done");
continue;
}
@ -501,7 +501,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai
} else if (!alive) {
fenced = true;
} else {
s_logger.debug("VM " + vm.getHostName() + " is found to be alive by " + investigator.getName());
s_logger.debug("VM " + vm.getInstanceName() + " is found to be alive by " + investigator.getName());
if (host.getStatus() == Status.Up) {
s_logger.info(vm + " is alive and host is up. No need to restart it.");
return null;

View File

@ -3533,12 +3533,12 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
try {
diskStatsAnswer = (GetVmDiskStatsAnswer)_agentMgr.easySend(hostId, new GetVmDiskStatsCommand(vmNames, host.getGuid(), host.getName()));
} catch (Exception e) {
s_logger.warn("Error while collecting disk stats for vm: " + userVm.getHostName() + " from host: " + host.getName(), e);
s_logger.warn("Error while collecting disk stats for vm: " + userVm.getInstanceName() + " from host: " + host.getName(), e);
return;
}
if (diskStatsAnswer != null) {
if (!diskStatsAnswer.getResult()) {
s_logger.warn("Error while collecting disk stats vm: " + userVm.getHostName() + " from host: " + host.getName() + "; details: " + diskStatsAnswer.getDetails());
s_logger.warn("Error while collecting disk stats vm: " + userVm.getInstanceName() + " from host: " + host.getName() + "; details: " + diskStatsAnswer.getDetails());
return;
}
try {