cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [2/2] git commit: updated refs/heads/master to 4721c53
Date Fri, 27 Jan 2017 00:06:14 GMT
Merge pull request #1749 from mike-tutkowski/archived_snapshots

CLOUDSTACK-9619: Updates for SAN-assisted snapshotsThis PR is to address a few issues in #1600
(which was recently merged to master for 4.10).

In StorageSystemDataMotionStrategy.performCopyOfVdi we call getSnapshotDetails. In one such
scenario, the source snapshot in question is coming from secondary storage (when we are creating
a new volume on managed storage from a snapshot of ours thats on secondary storage).

This usually worked in the regression tests due to a bit of "luck": We retrieve the ID of
the snapshot (which is on secondary storage) and then try to pull out its StorageVO object
(which is for primary storage). If you happen to have a primary storage that matches the ID
(which is the ID of a secondary storage), then getSnapshotDetails populates its Map<String,
String> with inapplicable data (that is later ignored) and you dont easily see a problem.
However, if you dont have a primary storage that matches that ID (which I didnt today because
I had removed that primary storage), then a NullPointerException is thrown.

I have fixed that issue by skipping getSnapshotDetails if the source is coming from secondary
storage.

While fixing that, I noticed a couple more problems:

1)       We can invoke grantAccess on a snapshot thats actually on secondary storage (this
doesnt amount to much because the VolumeServiceImpl ignores the call when its not for a primary-storage
driver).
2)       We can invoke revokeAccess on a snapshot thats actually on secondary storage (this
doesnt amount to much because the VolumeServiceImpl ignores the call when its not for a primary-storage
driver).

I have corrected those issues, as well.

I then came across one more problem:
         When using a SAN snapshot and copying it to secondary storage or creating a new managed-storage
volume from a snapshot of ours on secondary storage, we attach to the SR in the XenServer
code, but detach from it in the StorageSystemDataMotionStrategy code (by sending a message
to the XenServer code to perform an SR detach). Since we know to detach from the SR after
the copy is done, we should detach from the SR in the XenServer code (without that code having
to be explicitly called from outside of the XenServer logic).

I went ahead and changed that, as well.

JIRA Ticket:
https://issues.apache.org/jira/browse/CLOUDSTACK-9619

* pr/1749:
  CLOUDSTACK-9619: Updates for SAN-assisted snapshots

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4721c53e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4721c53e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4721c53e

Branch: refs/heads/master
Commit: 4721c53ea005b5b9ff570d5666da93a96d3a1640
Parents: a406102 06806a6
Author: Rajani Karuturi <rajani.karuturi@accelerite.com>
Authored: Fri Jan 27 05:35:05 2017 +0530
Committer: Rajani Karuturi <rajani.karuturi@accelerite.com>
Committed: Fri Jan 27 05:35:06 2017 +0530

----------------------------------------------------------------------
 .../motion/StorageSystemDataMotionStrategy.java | 138 +++++--------------
 .../snapshot/StorageSystemSnapshotStrategy.java |  22 ++-
 .../storage/volume/VolumeServiceImpl.java       |  46 +++++--
 .../resource/Xenserver625StorageProcessor.java  |  21 ++-
 .../storage/datastore/util/SolidFireUtil.java   |   5 +-
 .../plugins/solidfire/TestManagedSystemVMs.py   |   8 +-
 .../solidfire/TestVMMigrationWithStorage.py     |   2 +-
 .../plugins/solidfire/TestVMSnapshots.py        |  68 ---------
 .../plugins/solidfire/util/sf_util.py           |   4 +-
 9 files changed, 110 insertions(+), 204 deletions(-)
----------------------------------------------------------------------



Mime
View raw message