Github user anshul1886 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1867#discussion_r106384378
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -1078,6 +1082,16 @@ public void cleanupStorage(boolean recurring) {
                             }
                         }
     
    +                    //destroy snapshots in destroying state in 
snapshot_store_ref
    +                    List<SnapshotDataStoreVO>  ssSnapshots = 
_snapshotStoreDao.listByState(ObjectInDataStoreStateMachine.State.Destroying);
    +                    for(SnapshotDataStoreVO ssSnapshotVO : ssSnapshots){
    +                        try {
    +                            
_snapshotService.deleteSnapshot(snapshotFactory.getSnapshot(ssSnapshotVO.getSnapshotId(),
 DataStoreRole.Image));
    --- End diff --
    
    @koushik-das If there is any failure then the db entry will remain 
Destroying and will only be updated if there is successful deletion. Condition 
which is checking Destroying state of object  in SnapshotObject class is meant 
for this purpose.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to