cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-9706) Retry deleting snapshot if deleteSnapshot command failed
Date Thu, 16 Mar 2017 10:57:41 GMT

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

ASF GitHub Bot commented on CLOUDSTACK-9706:
--------------------------------------------

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

    https://github.com/apache/cloudstack/pull/1867#discussion_r106388631
  
    --- 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 in deleteSnapshot() then cleanup will be retried.
DB entry for such snapshots will only be removed on successful deletion. Destroying check
 introduced in SnapshotObject class is to make sure that DB entry doesn't gets deleted.


> Retry deleting snapshot if deleteSnapshot command failed 
> ---------------------------------------------------------
>
>                 Key: CLOUDSTACK-9706
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9706
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Anshul Gangwar
>            Assignee: Anshul Gangwar
>
> Currently when we delete snapshot then we mark it to be in destroyed state first and
then we go to delete it on storage if it can be deleted. If the deletion of snapshot fails
then we never retry to delete it which fills up storage.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message