mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2544: Fix NPE while comparing lastHostId during capacity calculation
This commit is contained in:
parent
f441582e1b
commit
d078f92167
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue