cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jburwell <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1600: Support Backup of Snapshots for Managed Stora...
Date Wed, 31 Aug 2016 21:44:31 GMT
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1600#discussion_r77079527
  
    --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java
---
    @@ -92,7 +90,34 @@
     
         @Override
         public SnapshotInfo backupSnapshot(SnapshotInfo snapshotInfo) {
    -        return snapshotInfo;
    +
    +        if (!snapshotInfo.getLocationType().equals(Snapshot.LocationType.SECONDARY))
{
    +
    +            markAsBackedUp((SnapshotObject)snapshotInfo);
    +            return snapshotInfo;
    +        }
    +
    +        // At this point the snapshot is either taken as a native
    +        // snapshot on the storage or exists as a volume on the storage (clone).
    +        // If archive flag is passed, we will copy this snapshot to secondary
    +        // storage and delete it from the primary storage.
    +
    +        Preconditions.checkState(Snapshot.LocationType.SECONDARY.equals(snapshotInfo.getLocationType()));
    +
    +        HostVO host = getHost(snapshotInfo.getVolumeId());
    +        boolean canStorageSystemCreateVolumeFromSnapshot = canStorageSystemCreateVolumeFromSnapshot(snapshotInfo.getBaseVolume().getPoolId());
    +        boolean computeClusterSupportsResign = clusterDao.getSupportsResigning(host.getClusterId());
    +
    +        if (!canStorageSystemCreateVolumeFromSnapshot || !computeClusterSupportsResign)
{
    +            String mesg = "Cannot archive snapshot: Either canStorageSystemCreateVolumeFromSnapshot
or " +
    +                    "computeClusterSupportsResign were false.  ";
    +
    +            s_logger.warn(mesg);
    --- End diff --
    
    Why is the message being logged to ``WARN`` and not ``ERROR``?


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

Mime
View raw message