matheusdaluz commented on a change in pull request #3389: when destroy the vms, 
delete the tags from virtual router
URL: https://github.com/apache/cloudstack/pull/3389#discussion_r291819399
 
 

 ##########
 File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
 ##########
 @@ -4601,17 +4627,23 @@ public UserVm destroyVm(long vmId, boolean expunge) 
throws ResourceUnavailableEx
         }
 
         boolean status;
+        boolean resultRemovedTags;
         State vmState = vm.getState();
 
         try {
             VirtualMachineEntity vmEntity = 
_orchSrvc.getVirtualMachine(vm.getUuid());
             status = vmEntity.destroy(Long.toString(userId), expunge);
+            resultRemovedTags = removeTagsFromVm(vmId);
         } catch (CloudException e) {
             CloudRuntimeException ex = new CloudRuntimeException("Unable to 
destroy with specified vmId", e);
             ex.addProxyObject(vm.getUuid(), "vmId");
             throw ex;
         }
 
+        if (!resultRemovedTags) {
 
 Review comment:
   ok, i'll fix this.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to