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/16 07:57:51 UTC

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

wido 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_r122384687
 
 

 ##########
 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:
   Could you change "is in using" to "is in use" ? That would be a better log line
 
----------------------------------------------------------------
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