server: allow expunging VMs in Expunging state (#7086)

This commit is contained in:
Wei Zhou 2023-01-13 05:58:16 +01:00 committed by GitHub
parent 0c925be44d
commit f9117df0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3304,7 +3304,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
throw new InvalidParameterValueException("unable to find a virtual machine with id " + vmId);
}
if ((vm.getState() == State.Destroyed && !expunge) || vm.getState() == State.Expunging) {
if (Arrays.asList(State.Destroyed, State.Expunging).contains(vm.getState()) && !expunge) {
s_logger.debug("Vm id=" + vmId + " is already destroyed");
return vm;
}