You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2014/02/05 00:25:33 UTC

git commit: updated refs/heads/master to 39efee2

Updated Branches:
  refs/heads/master cc8bde242 -> 39efee285


CLOUDSTACK-6027:CreateVolume from snapshot is failing with S3 on Vmware.


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

Branch: refs/heads/master
Commit: 39efee285f40006b5e1b7159445cb8692b19d6a5
Parents: cc8bde2
Author: Min Chen <mi...@citrix.com>
Authored: Tue Feb 4 15:04:11 2014 -0800
Committer: Min Chen <mi...@citrix.com>
Committed: Tue Feb 4 15:08:28 2014 -0800

----------------------------------------------------------------------
 .../src/com/cloud/storage/resource/VmwareStorageProcessor.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/39efee28/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
index 6157bd6..9e71dc5 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -1670,6 +1670,12 @@ public class VmwareStorageProcessor implements StorageProcessor {
                 throw new Exception(msg);
             }
 
+            // strip off the extension since restoreVolumeFromSecStorage internally will append suffix there.
+            if (backedUpSnapshotUuid.endsWith(".ova")){
+                backedUpSnapshotUuid = backedUpSnapshotUuid.replace(".ova", "");
+            } else if (backedUpSnapshotUuid.endsWith(".ovf")){
+                backedUpSnapshotUuid = backedUpSnapshotUuid.replace(".ovf", "");
+            }            
             DatastoreMO primaryDsMo = new DatastoreMO(hyperHost.getContext(), morPrimaryDs);
             restoreVolumeFromSecStorage(hyperHost, primaryDsMo, newVolumeName, secondaryStorageUrl, backupPath, backedUpSnapshotUuid);