cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yvsubhash <>
Subject [GitHub] cloudstack pull request #1722: CLOUDSTACK-9558 Cleanup the snapshots on the ...
Date Thu, 08 Dec 2016 18:02:12 GMT
Github user yvsubhash commented on a diff in the pull request:
    --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/
    @@ -260,11 +260,15 @@ public boolean deleteSnapshot(Long snapshotId) {
                 boolean result = deleteSnapshotChain(snapshotOnImage);
                 if (result) {
    -                //snapshot is deleted on backup storage, need to delete it on primary
    -                SnapshotDataStoreVO snapshotOnPrimary = snapshotStoreDao.findBySnapshot(snapshotId,
    -                if (snapshotOnPrimary != null) {
    -                    snapshotOnPrimary.setState(State.Destroyed);
    -                    snapshotStoreDao.update(snapshotOnPrimary.getId(), snapshotOnPrimary);
    +                SnapshotInfo snapshotOnPrimary = snapshotDataFactory.getSnapshot(snapshotId,
    +                if(snapshotSvr.deleteSnapshot(snapshotOnPrimary)) {
    --- End diff --
    If the db state is set to 'destroyed', it would no longer visible in the ui and entry
would be left behind in primary. Leaving it as is keeps the option of manual cleanup 

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 or file a JIRA ticket
with INFRA.

View raw message