More log statements to debug

This commit is contained in:
Prachi Damle 2013-04-05 17:59:50 -07:00
parent 0f565f2167
commit d38bf8a10c
2 changed files with 12 additions and 0 deletions

View File

@ -68,9 +68,18 @@ public class HostAntiAffinityProcessor extends AffinityProcessorBase implements
if (groupVM != null && !groupVM.isRemoved()) {
if (groupVM.getHostId() != null) {
avoid.addHost(groupVM.getHostId());
if (s_logger.isDebugEnabled()) {
s_logger.debug("Added host " + groupVM.getHostId() + " to avoid set, since VM "
+ groupVM.getId() + " is present on the host");
}
} else if (VirtualMachine.State.Stopped.equals(groupVM.getState())
&& groupVM.getLastHostId() != null) {
avoid.addHost(groupVM.getLastHostId());
if (s_logger.isDebugEnabled()) {
s_logger.debug("Added host " + groupVM.getLastHostId() + " to avoid set, since VM "
+ groupVM.getId() + " is present on the host, in Stopped state");
}
}
}
}

View File

@ -310,6 +310,9 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro
}
}
_affinityGroupVMMapDao.updateMap(vmId, affinityGroupIds);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Updated VM :" + vmId + " affinity groups to =" + affinityGroupIds);
}
// APIResponseHelper will pull out the updated affinitygroups.
return vmInstance;