CLOUDSTACK-2544: Fix NPE while comparing lastHostId during capacity calculation

This commit is contained in:
Kishan Kavala 2013-05-16 19:12:42 +05:30
parent f441582e1b
commit d078f92167
1 changed files with 1 additions and 1 deletions

View File

@ -681,7 +681,7 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
if ((newState == State.Starting || newState == State.Migrating || event == Event.AgentReportMigrated) && vm.getHostId() != null) {
boolean fromLastHost = false;
if (vm.getLastHostId().equals(vm.getHostId())) {
if (vm.getHostId().equals(vm.getLastHostId())) {
s_logger.debug("VM starting again on the last host it was stopped on");
fromLastHost = true;
}