@@ -89,7 +89,7 @@ protected void updateAndPublishVmPowerStates(long hostId, Map<Long, VirtualMachi
8989 return ;
9090 }
9191 for (Long vmId : vmIds ) {
92- if (!notUpdated .containsKey (vmId )) {
92+ if (MapUtils . isEmpty ( notUpdated ) || !notUpdated .containsKey (vmId )) {
9393 logger .debug ("VM state report is updated. {}, {}, power state: {}" ,
9494 () -> hostCache .get (hostId ), () -> vmCache .get (vmId ), () -> instancePowerStates .get (vmId ));
9595 _messageBus .publish (null , VirtualMachineManager .Topics .VM_POWER_STATE ,
@@ -158,8 +158,8 @@ private void processMissingVmReport(long hostId, Set<Long> vmIds, boolean force)
158158 // an update might have occurred that we should not override in case of out of band migration
159159 instancePowerStates .put (instance .getId (), VirtualMachine .PowerState .PowerReportMissing );
160160 } else {
161- logger .debug ("vm id: {} - time since last state update({} ms) has not passed graceful period yet" ,
162- instance .getId (), milliSecondsSinceLastStateUpdate );
161+ logger .debug ("vm id: {} - time since last state update({} ms) has not passed graceful period ({} ms) yet" ,
162+ instance .getId (), milliSecondsSinceLastStateUpdate , milliSecondsGracefulPeriod );
163163 }
164164 }
165165 updateAndPublishVmPowerStates (hostId , instancePowerStates , startTime );
0 commit comments