This is an automated email from the ASF dual-hosted git repository.

sureshanaparti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new f7fdc8a  Do remove volume only on expunge (#5213)
f7fdc8a is described below

commit f7fdc8a97450fee42e6648960158220aa9ca17b0
Author: sureshanaparti <[email protected]>
AuthorDate: Sat Jul 17 12:01:54 2021 +0530

    Do remove volume only on expunge (#5213)
---
 server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java 
b/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
index f77a007..8d67950 100644
--- a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1555,9 +1555,9 @@ public class VolumeApiServiceImpl extends ManagerBase 
implements VolumeApiServic
                 s_logger.warn("Failed to expunge volume: " + volumeId);
                 return null;
             }
+            removeVolume(volume.getId());
         }
 
-        removeVolume(volume.getId());
         return volume;
     }
 

Reply via email to