cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [4/6] git commit: bug CS-15119: check previously named datastore before we mount new one to support backwards compatibility
Date Thu, 07 Jun 2012 00:10:16 GMT
bug CS-15119: check previously named datastore before we mount new one to support backwards
compatibility

Reviewed-by:Anthony


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

Branch: refs/heads/master
Commit: 874544fd64419724835250eb75778980a51b6a0f
Parents: 9298e5d
Author: Kelven Yang <kelven@cloud.com>
Authored: Wed May 30 10:35:52 2012 -0700
Committer: Kelven Yang <kelven@cloud.com>
Committed: Wed Jun 6 16:56:41 2012 -0700

----------------------------------------------------------------------
 .../hypervisor/vmware/resource/VmwareResource.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/874544fd/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 73e1754..f882046 100755
--- a/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -2341,8 +2341,11 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
                 throw new Exception("Unsupported storage pool type " + pool.getType());
             }
 
-            ManagedObjectReference morDatastore = hyperHost.mountDatastore(pool.getType()
== StoragePoolType.VMFS, pool.getHost(), 
-                pool.getPort(), pool.getPath(), pool.getUuid().replace("-", ""));
+            ManagedObjectReference morDatastore = null;
+            morDatastore = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(hyperHost,
pool.getUuid());
+            if(morDatastore == null)
+	            morDatastore = hyperHost.mountDatastore(pool.getType() == StoragePoolType.VMFS,
pool.getHost(), 
+	                pool.getPort(), pool.getPath(), pool.getUuid().replace("-", ""));
 
             assert (morDatastore != null);
             DatastoreSummary summary = new DatastoreMO(getServiceContext(), morDatastore).getSummary();


Mime
View raw message