rhtyd commented on a change in pull request #5017:
URL: https://github.com/apache/cloudstack/pull/5017#discussion_r642384074



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -2261,6 +2268,13 @@ public boolean expunge(UserVmVO vm, long callerUserId, 
Account caller) {
         }
         try {
 
+            if (vm.getBackupOfferingId() != null) {
+                List<Backup> backupsForVm = 
backupDao.listByVmId(vm.getDataCenterId(), vm.getId());

Review comment:
       @Pearl1594 I think we should also check for any backup policy and remove 
that too.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to