Skip to content

Commit d078f92

Browse files
author
Kishan Kavala
committed
CLOUDSTACK-2544: Fix NPE while comparing lastHostId during capacity calculation
1 parent f441582 commit d078f92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎server/src/com/cloud/capacity/CapacityManagerImpl.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ public boolean postStateTransitionEvent(State oldState, Event event, State newSt
681681

682682
if ((newState == State.Starting || newState == State.Migrating || event == Event.AgentReportMigrated) && vm.getHostId() != null) {
683683
boolean fromLastHost = false;
684-
if (vm.getLastHostId().equals(vm.getHostId())) {
684+
if (vm.getHostId().equals(vm.getLastHostId())) {
685685
s_logger.debug("VM starting again on the last host it was stopped on");
686686
fromLastHost = true;
687687
}

0 commit comments

Comments
 (0)