mirror of https://github.com/apache/cloudstack.git
Merge 928033f188 into bce3e54a7e
This commit is contained in:
commit
ab7826b6b0
|
|
@ -89,7 +89,7 @@ public class VirtualMachinePowerStateSyncImpl implements VirtualMachinePowerStat
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (Long vmId : vmIds) {
|
for (Long vmId : vmIds) {
|
||||||
if (!notUpdated.containsKey(vmId)) {
|
if (MapUtils.isEmpty(notUpdated) || !notUpdated.containsKey(vmId)) {
|
||||||
logger.debug("VM state report is updated. {}, {}, power state: {}",
|
logger.debug("VM state report is updated. {}, {}, power state: {}",
|
||||||
() -> hostCache.get(hostId), () -> vmCache.get(vmId), () -> instancePowerStates.get(vmId));
|
() -> hostCache.get(hostId), () -> vmCache.get(vmId), () -> instancePowerStates.get(vmId));
|
||||||
_messageBus.publish(null, VirtualMachineManager.Topics.VM_POWER_STATE,
|
_messageBus.publish(null, VirtualMachineManager.Topics.VM_POWER_STATE,
|
||||||
|
|
@ -158,8 +158,8 @@ public class VirtualMachinePowerStateSyncImpl implements VirtualMachinePowerStat
|
||||||
// an update might have occurred that we should not override in case of out of band migration
|
// an update might have occurred that we should not override in case of out of band migration
|
||||||
instancePowerStates.put(instance.getId(), VirtualMachine.PowerState.PowerReportMissing);
|
instancePowerStates.put(instance.getId(), VirtualMachine.PowerState.PowerReportMissing);
|
||||||
} else {
|
} else {
|
||||||
logger.debug("vm id: {} - time since last state update({} ms) has not passed graceful period yet",
|
logger.debug("vm id: {} - time since last state update({} ms) has not passed graceful period ({} ms) yet",
|
||||||
instance.getId(), milliSecondsSinceLastStateUpdate);
|
instance.getId(), milliSecondsSinceLastStateUpdate, milliSecondsGracefulPeriod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateAndPublishVmPowerStates(hostId, instancePowerStates, startTime);
|
updateAndPublishVmPowerStates(hostId, instancePowerStates, startTime);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue