cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rhtyd closed pull request #2134: [Testing]: vm migration
Date Thu, 01 Jan 1970 00:00:00 GMT
rhtyd closed pull request #2134: [Testing]: vm migration
URL: https://github.com/apache/cloudstack/pull/2134
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 848cd7f524b..02bdd7ca13c 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
@@ -3499,7 +3499,6 @@ protected Answer execute(MigrateWithStorageCommand cmd) {
         ManagedObjectReference morDc = null;
         ManagedObjectReference morDcOfTargetHost = null;
         ManagedObjectReference morTgtHost = new ManagedObjectReference();
-        ManagedObjectReference morTgtDatastore = new ManagedObjectReference();
         VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec();
         List<VirtualMachineRelocateSpecDiskLocator> diskLocators = new ArrayList<VirtualMachineRelocateSpecDiskLocator>();
         VirtualMachineRelocateSpecDiskLocator diskLocator = null;
@@ -3554,8 +3553,9 @@ protected Answer execute(MigrateWithStorageCommand cmd) {
                     s_logger.error(msg);
                     throw new Exception(msg);
                 }
-                morTgtDatastore = morDsAtTarget;
-
+                if (morDsAtSource == null) {
+                    s_logger.debug("Source data store is null for srcHyperHost " + srcHyperHost.getHyperHostName()
+ " uuid = " + filerTo.getUuid());
+                }
                 // If host version is below 5.1 then simultaneous change of VM's datastore
and host is not supported.
                 // So since only the datastore will be changed first, ensure the target datastore
is mounted on source host.
                 if (srcHostApiVersion.compareTo("5.1") < 0) {
@@ -3589,11 +3589,18 @@ protected Answer execute(MigrateWithStorageCommand cmd) {
                             throw new Exception("Target VMFS datastore: " + tgtDsPath + "
is not accessible on source host: " + _hostName);
                         }
                     }
-                    morTgtDatastore = morDsAtSource;
+                }
+                else {
+                    if (morDsAtSource == null) {
+                        String msg = "Unable to find the source datastore: " + filerTo.getUuid()
+ " on source host: " + srcHyperHost.getHyperHostName()
+                                + " to execute MigrateWithStorageCommand";
+                        s_logger.error(msg);
+                        throw new Exception(msg);
+                    }
                 }
 
                 if (volume.getType() == Volume.Type.ROOT) {
-                    relocateSpec.setDatastore(morTgtDatastore);
+                    relocateSpec.setDatastore(morDsAtTarget);
                 }
                 diskLocator = new VirtualMachineRelocateSpecDiskLocator();
                 diskLocator.setDatastore(morDsAtSource);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message