Dogface2k commented on code in PR #13811:
URL: https://github.com/apache/cloudstack/pull/13811#discussion_r4314484428
##########
server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java:
##########
@@ -600,6 +605,11 @@ protected Long restart(final HaWorkVO work) {
logger.info("Unable to find vm: " + vmId);
return null;
}
+ if (VirtualMachine.State.Error.equals(vm.getState())) {
+ logger.info("Skipping HA restart for VM {} because it is in Error
state", vm);
+ return null;
+ }
Review Comment:
@sureshanaparti I checked the scheduling path when the VM is already in
Error, `scheduleRestart()` returns before persisting HA work or calling VM
orchestration. This HA restart path therefore adds no new entry to either table
for that VM. `op_it_work ` tracks VM operations separately; the presence of an
existing row does not tell us that it was inserted after the VM entered Error.
The guard in `restart()` is for HA work queued before the state changed. I
found that the worker can reschedule such an item before reaching that guard,
so I’ll fix that ordering before resolving this thread.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]