You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/06/19 06:49:41 UTC

[GitHub] pavanaravapalli commented on a change in pull request #2149: CLOUDSTACK-9932 snapshot is getting deleted while volume is in creating state

pavanaravapalli commented on a change in pull request #2149: CLOUDSTACK-9932 snapshot is getting deleted while volume is in creating state
URL: https://github.com/apache/cloudstack/pull/2149#discussion_r122630756
 
 

 ##########
 File path: server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
 ##########
 @@ -530,6 +534,13 @@ public boolean deleteSnapshot(long snapshotId) {
             return false;
         }
 
+        List<VolumeDetailVO> volumeCheck;
+        volumeCheck = _volumeDetailsDaoImpl.findDetails("SNAPSHOT_ID", String.valueOf(snapshotId), null);
+
+        if (volumeCheck.size() > 0) {
+            throw new InvalidParameterValueException("Unable to perform delete operation, Snapshot with id: " + snapshotId + " is in using  ");
 
 Review comment:
   @wido  changes done as suggested 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services