cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anim...@apache.org
Subject [03/19] git commit: updated refs/heads/4.3 to c1af92f
Date Fri, 07 Feb 2014 22:10:52 GMT
CLOUDSTACK-6019:CreateVolume from snapshot in NFS is throwing Warning
"sync snapshot from cache to region wide store failed for image store
test".
(cherry picked from commit b11c13d4a120a6361231ee415082576dac6fe385)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>


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

Branch: refs/heads/4.3
Commit: 0d72e2ccf51035b7b1ac9bba0a9a3cee407ac61e
Parents: 41e516b
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Feb 3 16:26:40 2014 -0800
Committer: Animesh Chaturvedi <animesh@apache.org>
Committed: Fri Feb 7 13:14:55 2014 -0800

----------------------------------------------------------------------
 .../resource/VmwareStorageSubsystemCommandHandler.java      | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d72e2cc/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageSubsystemCommandHandler.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageSubsystemCommandHandler.java
b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageSubsystemCommandHandler.java
index d1b8be8..5eccc3c 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageSubsystemCommandHandler.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageSubsystemCommandHandler.java
@@ -95,6 +95,15 @@ public class VmwareStorageSubsystemCommandHandler extends StorageSubsystemComman
             } else if (srcData.getObjectType() == DataObjectType.TEMPLATE) {
                 // sync template from NFS cache to S3 in NFS migration to S3 case
                 storageManager.createOvaForTemplate((TemplateObjectTO)srcData);
+            } else if (srcData.getObjectType() == DataObjectType.SNAPSHOT && destData.getObjectType()
== DataObjectType.SNAPSHOT) {
+                // sync snapshot from NFS cache to S3 in NFS migration to S3 case
+                String parentPath = storageResource.getRootDir(srcDataStore.getUrl());
+                SnapshotObjectTO snap = (SnapshotObjectTO)srcData;
+                String path = snap.getPath();
+                int index = path.lastIndexOf(File.separator);
+                String name = path.substring(index + 1);
+                String snapDir = path.substring(0, index);
+                storageManager.createOva(parentPath + File.separator + snapDir, name);
             } else if (srcData.getObjectType() == DataObjectType.SNAPSHOT && destData.getObjectType()
== DataObjectType.TEMPLATE) {
                 //create template from snapshot on src at first, then copy it to s3
                 TemplateObjectTO cacheTemplate = (TemplateObjectTO)destData;


Mime
View raw message