Damans227 commented on code in PR #14233:
URL: https://github.com/apache/cloudstack/pull/14233#discussion_r4274199506
##########
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java:
##########
@@ -2514,6 +2569,16 @@ private void advanceStop(final VMInstanceVO vm, final
boolean cleanUpEvenIfUnabl
if (!cleanUpEvenIfUnableToStop) {
throw new CloudRuntimeException("We cannot stop " + vm + "
when it is in state " + vm.getState());
}
+ // cleanup() releases the resources whether or not the host
answers. For a destroy on a host that is not
+ // gone, go ahead only once the host has confirmed the instance is
stopped.
+ if (releaseOnlyIfHostIsGone && !isHostGone(vm.getHostId())) {
Review Comment:
for an instance stuck in migrating, this only checks the target host. what
happens if the target is down but the old host is still running it? looks like
it still gets released
--
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]