[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15175440#comment-15175440
 ] 

Wei Zhou commented on CLOUDSTACK-9297:
--------------------------------------

this makes more sense to me.

{code}
diff --git 
a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java
 b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/Stora
index d1470e4..088fe38 100644
--- 
a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java
+++ 
b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java
@@ -456,8 +456,10 @@ public class StorageSystemSnapshotStrategy extends 
SnapshotStrategyBase {

             if (snapshotStore != null) {
                 storagePoolId = snapshotStore.getDataStoreId();
-            }
-            else {
+            } else if (SnapshotOperation.DELETE.equals(op)) {
+                volumeVO = _volumeDao.findByIdIncludingRemoved(volumeId);
+                storagePoolId = volumeVO.getPoolId();
+            } else {
                 throw new CloudRuntimeException("Unable to determine the 
storage pool of the snapshot");
             }
         }
{code}

> delete snapshot without id is failing with Unable to determine the storage 
> pool of the snapshot
> -----------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9297
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9297
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: API
>    Affects Versions: 4.8.0
>         Environment: Ubuntu 14.04.3 management + kvm
>            Reporter: Özhan Rüzgar Karaman
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to