cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/master to 64b8d10
Date Thu, 09 Jan 2014 23:17:53 GMT
Updated Branches:
  refs/heads/master 8b6e89c01 -> 64b8d1044


CLOUDSTACK-5819:extractTemplate fails with Vmware host on migration of
NFS to S3.


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

Branch: refs/heads/master
Commit: 64b8d1044d9e7759ebeebe86462740a4bcc019e2
Parents: 8b6e89c
Author: Min Chen <min.chen@citrix.com>
Authored: Thu Jan 9 14:04:29 2014 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Thu Jan 9 15:08:23 2014 -0800

----------------------------------------------------------------------
 .../cloud/hypervisor/vmware/manager/VmwareStorageManager.java    | 4 ++++
 .../hypervisor/vmware/manager/VmwareStorageManagerImpl.java      | 1 +
 .../storage/resource/VmwareStorageSubsystemCommandHandler.java   | 3 +++
 3 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64b8d104/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManager.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManager.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManager.java
index fe91cae..f78f370 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManager.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManager.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.hypervisor.vmware.manager;
 
+import org.apache.cloudstack.storage.to.TemplateObjectTO;
+
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.BackupSnapshotCommand;
 import com.cloud.agent.api.CreatePrivateTemplateFromSnapshotCommand;
@@ -50,4 +52,6 @@ public interface VmwareStorageManager {
     boolean execute(VmwareHostService hostService, CreateEntityDownloadURLCommand cmd);
 
     public void createOva(String path, String name);
+
+    public String createOvaForTemplate(TemplateObjectTO template);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64b8d104/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
index cd3fe73..0f18936 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
@@ -144,6 +144,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager
{
         _timeout = NumbersUtil.parseInt(value, 1440) * 1000;
     }
 
+    @Override
     public String createOvaForTemplate(TemplateObjectTO template) {
         DataStoreTO storeTO = template.getDataStore();
         if (!(storeTO instanceof NfsTO)) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/64b8d104/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 8391c64..39c3539 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageSubsystemCommandHandler.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageSubsystemCommandHandler.java
@@ -89,6 +89,9 @@ public class VmwareStorageSubsystemCommandHandler extends StorageSubsystemComman
                 String name = path.substring(index + 1);
                 storageManager.createOva(parentPath + File.separator + path, name);
                 vol.setPath(path + File.separator + name + ".ova");
+            } 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.TEMPLATE) {
                 //create template from snapshot on src at first, then copy it to s3
                 TemplateObjectTO cacheTemplate = (TemplateObjectTO)destData;


Mime
View raw message