cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-10222) Clean previous snaphosts from primary storage when taking new one
Date Tue, 09 Jan 2018 18:26:00 GMT


ASF GitHub Bot commented on CLOUDSTACK-10222:

rafaelweingartner commented on a change in pull request #2398: CLOUDSTACK-10222: Clean previous
snaphosts from primary storage when …

 File path: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/
 @@ -576,13 +578,20 @@ public Answer backupSnapshot(final CopyCommand cmd) {
   "New snapshot details: " + newSnapshot.toString());
   "New snapshot physical utilization: "+physicalSize);
+            successful = true;
             return new CopyCmdAnswer(newSnapshot);
         } catch (final Types.XenAPIException e) {
             details = "BackupSnapshot Failed due to " + e.toString();
             s_logger.warn(details, e);
         } catch (final Exception e) {
             details = "BackupSnapshot Failed due to " + e.getMessage();
             s_logger.warn(details, e);
+        } finally {
+            if (!successful) {
 Review comment:
   What about removing this finally and boolean control variable? You only need to worry about
exception cases (normal workflow is already addressed at 567-568). So, you can do something
like this in the catch block: 
   destroySnapshotOnPrimaryStorage(conn, snapshotUuid);
   BTW: the method `destroySnapshotOnPrimaryStorage(Conn, String)` does seem to need that
boolean return and we also could remove its catch of `Exception`.

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:

> Clean previous snaphosts from primary storage when taking new one
> -----------------------------------------------------------------
>                 Key: CLOUDSTACK-10222
>                 URL:
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Secondary Storage, Snapshot, XenServer
>    Affects Versions:
>         Environment: XenServer, Swift
>            Reporter: Khosrow Moossavi
>             Fix For:
> When user creates a snapshot (manual or recurring), snapshot remains on the primary storage,
even if the snapshot is transferred successfully to secondary storage. This is causing issues
because XenServer can only hold a limited number of snapshots in its VDI chain, preventing
the user from creating new snapshots after some time, when too many old snapshots are present
on the primary storage. 
> {code:java}
> reason: SR_BACKEND_FAILURE_109 The snapshot chain is too long
> {code}
> Proposed solution:
> Keep only one snapshot (last successful) on the primary storage regardless that it was
a full or partial snapshot.

This message was sent by Atlassian JIRA

View raw message