cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From likit...@apache.org
Subject git commit: updated refs/heads/master to ddcae8a
Date Wed, 24 Dec 2014 05:08:42 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 521258baf -> ddcae8a93


CLOUDSTACK-8118. Root volume migration fails with 'No such disk device' in case of vCenter
5.5 setup.
If an exact match is being done while locating disk chain by name, don't trim snapshot postfix
appended to the disk name.


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

Branch: refs/heads/master
Commit: ddcae8a9306f5f7dd416b859e59fd10094c91551
Parents: 521258b
Author: Likitha Shetty <likitha.shetty@citrix.com>
Authored: Fri Nov 28 11:09:01 2014 +0530
Committer: Likitha Shetty <likitha.shetty@citrix.com>
Committed: Wed Dec 24 10:19:22 2014 +0530

----------------------------------------------------------------------
 .../cloud/hypervisor/vmware/resource/VmwareResource.java |  2 +-
 .../com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java | 11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ddcae8a9/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 5a16f03..53cdb99 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
@@ -3205,7 +3205,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
     }
 
     private int getVirtualDiskInfo(VirtualMachineMO vmMo, String srcDiskName) throws Exception
{
-        Pair<VirtualDisk, String> deviceInfo = vmMo.getDiskDevice(srcDiskName, true);
+        Pair<VirtualDisk, String> deviceInfo = vmMo.getDiskDevice(srcDiskName, false);
         if (deviceInfo == null) {
             throw new Exception("No such disk device: " + srcDiskName);
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ddcae8a9/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
index 471b4a8..be39bfb 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
@@ -1931,10 +1931,13 @@ public class VirtualMachineMO extends BaseMO {
 
         DatastoreFile dsSrcFile = new DatastoreFile(vmdkDatastorePath);
         String srcBaseName = dsSrcFile.getFileBaseName();
+        String trimmedSrcBaseName = trimSnapshotDeltaPostfix(srcBaseName);
 
-        srcBaseName = trimSnapshotDeltaPostfix(srcBaseName);
-
-        s_logger.info("Look for disk device info from volume : " + vmdkDatastorePath + "
with trimmed base name: " + srcBaseName);
+        if (matchExactly) {
+            s_logger.info("Look for disk device info from volume : " + vmdkDatastorePath
+ " with base name: " + srcBaseName);
+        } else {
+            s_logger.info("Look for disk device info from volume : " + vmdkDatastorePath
+ " with trimmed base name: " + trimmedSrcBaseName);
+        }
 
         if (devices != null && devices.size() > 0) {
             for (VirtualDevice device : devices) {
@@ -1957,7 +1960,7 @@ public class VirtualMachineMO extends BaseMO {
                                     return new Pair<VirtualDisk, String>((VirtualDisk)device,
deviceNumbering);
                                 }
                             } else {
-                                if (backingBaseName.contains(srcBaseName)) {
+                                if (backingBaseName.contains(trimmedSrcBaseName)) {
                                     String deviceNumbering = getDeviceBusName(devices, device);
 
                                     s_logger.info("Disk backing : " + diskBackingInfo.getFileName()
+ " matches ==> " + deviceNumbering);


Mime
View raw message