Save off the UUID of the VDI before detaching its SR

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

Branch: refs/heads/hotfix/CLOUDSTACK-7776
Commit: b1ffd88a420ca3525963eef70c28d239c035ad3d
Parents: 15c8d8c
Author: Mike Tutkowski <mike.tutkow...@solidfire.com>
Authored: Mon Oct 20 16:44:34 2014 -0600
Committer: Mike Tutkowski <mike.tutkow...@solidfire.com>
Committed: Tue Oct 21 16:01:15 2014 -0600

----------------------------------------------------------------------
 .../hypervisor/xenserver/resource/XenServerStorageProcessor.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b1ffd88a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java
 
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java
index 933fd20..880f3e0 100644
--- 
a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java
+++ 
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java
@@ -135,6 +135,8 @@ public class XenServerStorageProcessor implements 
StorageProcessor {
 
             VDI vdiCopy = vdiSnapshot.copy(conn, newSr);
 
+            String vdiUuid = vdiCopy.getUuid(conn);
+
             vdiSnapshot.destroy(conn);
 
             if (sourceSr != null) {
@@ -145,7 +147,7 @@ public class XenServerStorageProcessor implements 
StorageProcessor {
 
             SnapshotAndCopyAnswer snapshotAndCopyAnswer = new 
SnapshotAndCopyAnswer();
 
-            snapshotAndCopyAnswer.setPath(vdiCopy.getUuid(conn));
+            snapshotAndCopyAnswer.setPath(vdiUuid);
 
             return snapshotAndCopyAnswer;
         }

Reply via email to