Skip to content

Commit c3ab6eb

Browse files
committed
skip instance with delete protection during account cleanup
1 parent c1af36f commit c3ab6eb

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

server/src/main/java/com/cloud/user/AccountManagerImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,12 @@ protected boolean cleanupAccount(AccountVO account, long callerUserId, Account c
10001000
}
10011001

10021002
for (UserVmVO vm : vms) {
1003+
if (vm.isDeleteProtection()) {
1004+
logger.warn("Instance [id = {}, name = {}] has delete protection enabled and cannot be deleted.",
1005+
vm.getUuid(), vm.getName());
1006+
continue;
1007+
}
1008+
10031009
if (vm.getState() != VirtualMachine.State.Destroyed && vm.getState() != VirtualMachine.State.Expunging) {
10041010
try {
10051011
_vmMgr.destroyVm(vm.getId(), false);

tools/marvin/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
raise RuntimeError("python setuptools is required to build Marvin")
2828

2929

30-
VERSION = "4.22.1.0-SNAPSHOT"
30+
VERSION = "4.22.1.0"
3131

3232
setup(name="Marvin",
3333
version=VERSION,

0 commit comments

Comments
 (0)