Skip to content

Commit 1420c76

Browse files
DaanHooglanddhslove
authored andcommitted
get expunged VM data for job result (apache#9949)
1 parent 143f79d commit 1420c76

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5919,8 +5919,11 @@ public UserVm destroyVm(long vmId, boolean expunge) throws ResourceUnavailableEx
59195919
ex.addProxyObject(vm.getUuid(), "vmId");
59205920
throw ex;
59215921
}
5922-
} catch (Exception e) {
5923-
throw new CloudRuntimeException("Failed to destroy vm with specified vmId", e);
5922+
return _vmDao.findByIdIncludingRemoved(vmId);
5923+
} else {
5924+
CloudRuntimeException ex = new CloudRuntimeException("Failed to destroy vm with specified vmId");
5925+
ex.addProxyObject(vm.getUuid(), "vmId");
5926+
throw ex;
59245927
}
59255928

59265929
}

0 commit comments

Comments
 (0)