Fix hostId verification on unsuccessful expunge operation (#10418)

This commit is contained in:
Nicole Schmidt 2025-02-20 11:11:53 -03:00 committed by GitHub
parent 4b432c82ca
commit c80b8860e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -707,7 +707,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
private void handleUnsuccessfulExpungeOperation(List<Command> finalizeExpungeCommands, List<Command> nicExpungeCommands,
VMInstanceVO vm, Long hostId) throws OperationTimedoutException, AgentUnavailableException {
if (CollectionUtils.isNotEmpty(finalizeExpungeCommands) || CollectionUtils.isNotEmpty(nicExpungeCommands) && (hostId != null)) {
if ((CollectionUtils.isNotEmpty(finalizeExpungeCommands) || CollectionUtils.isNotEmpty(nicExpungeCommands)) && hostId != null) {
final Commands cmds = new Commands(Command.OnError.Stop);
addAllExpungeCommandsFromList(finalizeExpungeCommands, cmds, vm);
addAllExpungeCommandsFromList(nicExpungeCommands, cmds, vm);