cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject git commit: updated refs/heads/master to bca0153
Date Tue, 09 Dec 2014 10:27:29 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 76bb54b77 -> bca015306


CLOUDSTACK-7803 Storage live migration of instance may not happen if instance has ISO attached.

BUG-ID:CLOUDSTACK-7803
Summary:Ensure secondary storage is mounted on target host.
Reviewed-By:Rajesh

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>


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

Branch: refs/heads/master
Commit: bca015306e5c16915b5a76d846294c593e1df15c
Parents: 76bb54b
Author: Sateesh Chodapuneedi <sateesh@apache.org>
Authored: Tue Dec 9 00:47:14 2014 +0530
Committer: Sateesh Chodapuneedi <sateesh@apache.org>
Committed: Tue Dec 9 03:27:31 2014 +0530

----------------------------------------------------------------------
 .../hypervisor/vmware/resource/VmwareResource.java    | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bca01530/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index edcd9eb..d175d85 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -3028,7 +3028,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
                 throw new Exception(msg);
             }
             mgr.prepareSecondaryStorageStore(secStoreUrl);
-            ManagedObjectReference morSecDs = prepareSecondaryDatastoreOnHost(secStoreUrl);
+            ManagedObjectReference morSecDs = prepareSecondaryDatastoreOnSpecificHost(secStoreUrl,
tgtHyperHost);
             if (morSecDs == null) {
                 String msg = "Failed to prepare secondary storage on host, secondary store
url: " + secStoreUrl;
                 throw new Exception(msg);
@@ -3381,6 +3381,18 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
         return morDatastore;
     }
 
+    public synchronized ManagedObjectReference prepareSecondaryDatastoreOnSpecificHost(String
storeUrl, VmwareHypervisorHost hyperHost) throws Exception {
+        String storeName = getSecondaryDatastoreUUID(storeUrl);
+        URI uri = new URI(storeUrl);
+
+        ManagedObjectReference morDatastore = hyperHost.mountDatastore(false, uri.getHost(),
0, uri.getPath(), storeName.replace("-", ""));
+
+        if (morDatastore == null)
+            throw new Exception("Unable to mount secondary storage on host. storeUrl: " +
storeUrl);
+
+        return morDatastore;
+    }
+
     private static String getSecondaryDatastoreUUID(String storeUrl) {
         return UUID.nameUUIDFromBytes(storeUrl.getBytes()).toString();
     }


Mime
View raw message