You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/07/02 10:29:26 UTC

[GitHub] [cloudstack] shwstppr opened a new pull request #5170: vmware: fix migrate vm with volume

shwstppr opened a new pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170


   ### Description
   
   Recent forward merge of 4.15 branch accidentally brought a bug in VM relocation method for VMware while trying to find datastore for the migrated volume.
   This PR fixes it by using either of available target or source host.
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [x] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   
   ```
   [root@pr5030-t1171-vmware-65u2-marvin marvin]# nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=./pr5030-t1171-vmware-65u2-advanced-cfg -s -a tags=advanced --hypervisor=VMware tests/smoke/test_vm_life_cycle.py
   
   ==== Marvin Init Started ====
   
   === Marvin Parse Config Successful ===
   
   === Marvin Setting TestData Successful===
   
   ==== Log Folder Path: /marvin/MarvinLogs/Jun_30_2021_10_47_36_DT690J. All logs will be available here ====
   
   === Marvin Init Logging Successful===
   
   ==== Marvin Init Successful ====
   === TestName: test_advZoneVirtualRouter | Status : SUCCESS ===
   
   === TestName: test_deploy_vm | Status : SUCCESS ===
   
   === TestName: test_deploy_vm_multiple | Status : SUCCESS ===
   
   === TestName: test_01_migrate_VM_and_root_volume | Status : SUCCESS ===
   
   === TestName: test_02_migrate_VM_with_two_data_disks | Status : SUCCESS ===
   
   === TestName: test_03_migrate_detached_volume | Status : SUCCESS ===
   
   === TestName: test_01_unmanage_vm_cycle | Status : SUCCESS ===
   ...
   ````
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-871340226


   @blueorangutan test centos7 vmware-65u2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r661358650



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7501,7 +7501,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                             VolumeObjectTO newVol = new VolumeObjectTO();
                             newVol.setDataStoreUuid(entry.second().getUuid());
                             String newPath = vmMo.getVmdkFileBaseName(disk);
-                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost, entry.second().getUuid());
+                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost != null ? targetHyperHost : sourceHyperHost, entry.second().getUuid());

Review comment:
       @shwstppr great, thanks.
   
   no idea if it breaks some features. at least the NPE is fixed by this pr.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-874285127


   @blueorangutan test centos7 vmware-65u2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r661360530



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7501,7 +7501,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                             VolumeObjectTO newVol = new VolumeObjectTO();
                             newVol.setDataStoreUuid(entry.second().getUuid());
                             String newPath = vmMo.getVmdkFileBaseName(disk);
-                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost, entry.second().getUuid());
+                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost != null ? targetHyperHost : sourceHyperHost, entry.second().getUuid());

Review comment:
       Change was originally introduced here, https://github.com/apache/cloudstack/commit/d2ab350a40cffe4eacf625e1648db7c12341f2cb




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-872125761


   @blueorangutan test centos7 vmware-65u2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr closed pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr closed pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r663905949



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7337,20 +7337,20 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
             if (targetHyperHost != null) {
                 ManagedObjectReference morTargetHostDc = targetHyperHost.getHyperHostDatacenter();
                 if (!morSourceHostDc.getValue().equalsIgnoreCase(morTargetHostDc.getValue())) {
-                    String msg = "VM " + vmName + " cannot be migrated between different datacenter";
+                    String msg = String.format("VM: %s cannot be migrated between different datacenter", vmName);

Review comment:
       @GutoVeronezi `VirtualMachineTO` is not always available. It is available only in case when this method `relocateVirtualMachine` is called for `MigrateWithStorageCommand` while it remains null for `MigrateVolume` and `MigrateVmToPoolCommand`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r663893353



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7445,7 +7443,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                 mgr.prepareSecondaryStorageStore(secStoreUrl, secStoreId);
                 ManagedObjectReference morSecDs = prepareSecondaryDatastoreOnSpecificHost(secStoreUrl, targetHyperHost);
                 if (morSecDs == null) {
-                    String msg = "Failed to prepare secondary storage on host, secondary store url: " + secStoreUrl;
+                    String msg = String.format("Failed to prepare secondary storage on host, secondary store url: %s", secStoreUrl);

Review comment:
       As the var is used only once, we could implement this message directly in the `throw new ...`.

##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7475,9 +7473,11 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                 if (!vmMo.changeDatastore(relocateSpec)) {
                     throw new Exception("Change datastore operation failed during storage migration");
                 } else {
-                    s_logger.debug("Successfully migrated VM " + vmName +
-                            (hostInTargetCluster != null ? " from " + sourceHyperHost.getHyperHostName() + " to " + targetHyperHost.getHyperHostName() + " and " : " with ") +
-                            "its storage to target datastore(s)");
+                    String msg = String.format("Successfully migrated VM: %s with its storage to target datastore(s)", vmName);
+                    if (targetHyperHost != null) {
+                        msg += String.format(" from host %s to %s", sourceHyperHost.getHyperHostName(), targetHyperHost.getHyperHostName());

Review comment:
       ```suggestion
                           msg = String.format("% from host %s to %s", msg, sourceHyperHost.getHyperHostName(), targetHyperHost.getHyperHostName());
   ```

##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7337,20 +7337,20 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
             if (targetHyperHost != null) {
                 ManagedObjectReference morTargetHostDc = targetHyperHost.getHyperHostDatacenter();
                 if (!morSourceHostDc.getValue().equalsIgnoreCase(morTargetHostDc.getValue())) {
-                    String msg = "VM " + vmName + " cannot be migrated between different datacenter";
+                    String msg = String.format("VM: %s cannot be migrated between different datacenter", vmName);

Review comment:
       `VirtualMachineTO` has a `toString` that prints id, name, uuid and type. We could use the `vmTO.toString()` here and wherever we print `vmName`.

##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7337,20 +7337,20 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
             if (targetHyperHost != null) {
                 ManagedObjectReference morTargetHostDc = targetHyperHost.getHyperHostDatacenter();
                 if (!morSourceHostDc.getValue().equalsIgnoreCase(morTargetHostDc.getValue())) {
-                    String msg = "VM " + vmName + " cannot be migrated between different datacenter";
+                    String msg = String.format("VM: %s cannot be migrated between different datacenter", vmName);

Review comment:
       @shwstppr understood, thanks.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-871596980


   @nvazquez no, I don't think anything was missed. Just that line of that finds datastore for the migrated volume needed small change as `targetHyperHost` can be null in `relocateVirtualMachine` method. https://github.com/apache/cloudstack/pull/5097/files#diff-77635c5f7eb9cef514aaf69e2fdc9217619afc9005bf8db9585c176e7401a88bR4808
   
   And since the `relocateVirtualMachine` method is not there in 4.15 code, changes from this PR are not needed there.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-871325694


   Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 432


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr closed pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr closed pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr removed a comment on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr removed a comment on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-873447200


   @blueorangutan centos7 vmware-65u2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-874267322


   @shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-873638197


   @blueorangutan test centos7 vmware-65u2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-873447200


   @blueorangutan centos7 vmware-65u2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r663893353



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7445,7 +7443,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                 mgr.prepareSecondaryStorageStore(secStoreUrl, secStoreId);
                 ManagedObjectReference morSecDs = prepareSecondaryDatastoreOnSpecificHost(secStoreUrl, targetHyperHost);
                 if (morSecDs == null) {
-                    String msg = "Failed to prepare secondary storage on host, secondary store url: " + secStoreUrl;
+                    String msg = String.format("Failed to prepare secondary storage on host, secondary store url: %s", secStoreUrl);

Review comment:
       As the var is used only once, we could implement this message directly in the `throw new ...`.

##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7475,9 +7473,11 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                 if (!vmMo.changeDatastore(relocateSpec)) {
                     throw new Exception("Change datastore operation failed during storage migration");
                 } else {
-                    s_logger.debug("Successfully migrated VM " + vmName +
-                            (hostInTargetCluster != null ? " from " + sourceHyperHost.getHyperHostName() + " to " + targetHyperHost.getHyperHostName() + " and " : " with ") +
-                            "its storage to target datastore(s)");
+                    String msg = String.format("Successfully migrated VM: %s with its storage to target datastore(s)", vmName);
+                    if (targetHyperHost != null) {
+                        msg += String.format(" from host %s to %s", sourceHyperHost.getHyperHostName(), targetHyperHost.getHyperHostName());

Review comment:
       ```suggestion
                           msg = String.format("% from host %s to %s", msg, sourceHyperHost.getHyperHostName(), targetHyperHost.getHyperHostName());
   ```

##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7337,20 +7337,20 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
             if (targetHyperHost != null) {
                 ManagedObjectReference morTargetHostDc = targetHyperHost.getHyperHostDatacenter();
                 if (!morSourceHostDc.getValue().equalsIgnoreCase(morTargetHostDc.getValue())) {
-                    String msg = "VM " + vmName + " cannot be migrated between different datacenter";
+                    String msg = String.format("VM: %s cannot be migrated between different datacenter", vmName);

Review comment:
       `VirtualMachineTO` has a `toString` that prints id, name, uuid and type. We could use the `vmTO.toString()` here and wherever we print `vmName`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-874285741


   @shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-873935658






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r661521124



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7501,7 +7501,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                             VolumeObjectTO newVol = new VolumeObjectTO();
                             newVol.setDataStoreUuid(entry.second().getUuid());
                             String newPath = vmMo.getVmdkFileBaseName(disk);
-                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost, entry.second().getUuid());
+                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost != null ? targetHyperHost : sourceHyperHost, entry.second().getUuid());

Review comment:
       @shwstppr if the origin is a merge commit than this should be fixed on the older branch and merged forward.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez edited a comment on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
nvazquez edited a comment on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-871592042


   Thanks @shwstppr I have resolved conflicts to merge 4.15 into main, did I miss those changes? Most of the conflicts were from this PR: https://github.com/apache/cloudstack/pull/5097 as the logic differs from 4.15 and main in those files


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
GutoVeronezi commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r663907937



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7337,20 +7337,20 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
             if (targetHyperHost != null) {
                 ManagedObjectReference morTargetHostDc = targetHyperHost.getHyperHostDatacenter();
                 if (!morSourceHostDc.getValue().equalsIgnoreCase(morTargetHostDc.getValue())) {
-                    String msg = "VM " + vmName + " cannot be migrated between different datacenter";
+                    String msg = String.format("VM: %s cannot be migrated between different datacenter", vmName);

Review comment:
       @shwstppr understood, thanks.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r661354336



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7501,7 +7501,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                             VolumeObjectTO newVol = new VolumeObjectTO();
                             newVol.setDataStoreUuid(entry.second().getUuid());
                             String newPath = vmMo.getVmdkFileBaseName(disk);
-                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost, entry.second().getUuid());
+                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost != null ? targetHyperHost : sourceHyperHost, entry.second().getUuid());

Review comment:
       @shwstppr might sourceHyperHost be null as well ?
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd merged pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr closed pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr closed pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-874471770


   <b>Trillian test result (tid-1206)</b>
   Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 35388 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5170-t1206-vmware-65u2.zip
   Smoke tests completed. 88 look OK, 0 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-872126300


   @shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-871309164


   @shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r661357017



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7501,7 +7501,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                             VolumeObjectTO newVol = new VolumeObjectTO();
                             newVol.setDataStoreUuid(entry.second().getUuid());
                             String newPath = vmMo.getVmdkFileBaseName(disk);
-                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost, entry.second().getUuid());
+                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost != null ? targetHyperHost : sourceHyperHost, entry.second().getUuid());

Review comment:
       @weizhouapache Method gets `sourceHyperHost` either from caller or the host which is processing the command,
   https://github.com/apache/cloudstack/pull/5170/files#diff-77635c5f7eb9cef514aaf69e2fdc9217619afc9005bf8db9585c176e7401a88bR7329-R7331
   Cannot be null if the command is being processed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r661358766



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7501,7 +7501,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                             VolumeObjectTO newVol = new VolumeObjectTO();
                             newVol.setDataStoreUuid(entry.second().getUuid());
                             String newPath = vmMo.getVmdkFileBaseName(disk);
-                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost, entry.second().getUuid());
+                            ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost != null ? targetHyperHost : sourceHyperHost, entry.second().getUuid());

Review comment:
       Above ^^ is my understanding. Let me know if there should be additional checks @weizhouapache 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-871308591


   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-871461649


   @DaanHoogland 4.15 has a different code. Change that resulted in error was added in https://github.com/apache/cloudstack/commit/d2ab350a40cffe4eacf625e1648db7c12341f2cb to probably address merge conflicts cc @nvazquez 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r663905949



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7337,20 +7337,20 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
             if (targetHyperHost != null) {
                 ManagedObjectReference morTargetHostDc = targetHyperHost.getHyperHostDatacenter();
                 if (!morSourceHostDc.getValue().equalsIgnoreCase(morTargetHostDc.getValue())) {
-                    String msg = "VM " + vmName + " cannot be migrated between different datacenter";
+                    String msg = String.format("VM: %s cannot be migrated between different datacenter", vmName);

Review comment:
       @GutoVeronezi `VirtualMachineTO` is not always available. It is available only in case when this method `relocateVirtualMachine` is called for `MigrateWithStorageCommand` while it remains null for `MigrateVolume` and `MigrateVmToPoolCommand`

##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7445,7 +7443,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                 mgr.prepareSecondaryStorageStore(secStoreUrl, secStoreId);
                 ManagedObjectReference morSecDs = prepareSecondaryDatastoreOnSpecificHost(secStoreUrl, targetHyperHost);
                 if (morSecDs == null) {
-                    String msg = "Failed to prepare secondary storage on host, secondary store url: " + secStoreUrl;
+                    String msg = String.format("Failed to prepare secondary storage on host, secondary store url: %s", secStoreUrl);

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-874276570


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian. SL-JID 476


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-871340445


   @weizhouapache a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-874266966


   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr edited a comment on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr edited a comment on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-871596980


   @nvazquez no, I don't think anything was missed. Just that line of code that finds datastore for the migrated volume needed small change as `targetHyperHost` can be null in `relocateVirtualMachine` method. https://github.com/apache/cloudstack/pull/5097/files#diff-77635c5f7eb9cef514aaf69e2fdc9217619afc9005bf8db9585c176e7401a88bR4808
   
   And since the `relocateVirtualMachine` method is not there in 4.15 code, changes from this PR are not needed there.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-874266966






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-871592042


   Thanks @shwstppr I have resolved conflicts to merge 4.15 into main, did I miss those changes? Most of the conflicts were from this PR: https://github.com/apache/cloudstack/pull/5097 as the differs from 4.15 and main in those files


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-872715714


   Though migration tests from test_vm_lifecycle.py seem to be running fine, re-running tests to verify intermittent failures
   
   @blueorangutan test centos7 vmware-65u2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-873935658


   <b>Trillian test result (tid-1198)</b>
   Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 50235 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5170-t1198-vmware-65u2.zip
   Intermittent failure detected: /marvin/tests/smoke/test_diagnostics.py
   Intermittent failure detected: /marvin/tests/smoke/test_network.py
   Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
   Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
   Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py
   Smoke tests completed. 85 look OK, 3 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_ping_in_vr_success | `Failure` | 15.34 | test_diagnostics.py
   test_05_ping_in_cpvm_success | `Failure` | 5.14 | test_diagnostics.py
   test_07_arping_in_vr | `Failure` | 5.14 | test_diagnostics.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Failure` | 405.89 | test_routers_network_ops.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 617.55 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 563.75 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 597.71 | test_vpc_redundant.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-872714817


   Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 455


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-872716120


   @shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr closed pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr closed pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-873638274


   @shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] shwstppr commented on a change in pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#discussion_r663908256



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -7445,7 +7443,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
                 mgr.prepareSecondaryStorageStore(secStoreUrl, secStoreId);
                 ManagedObjectReference morSecDs = prepareSecondaryDatastoreOnSpecificHost(secStoreUrl, targetHyperHost);
                 if (morSecDs == null) {
-                    String msg = "Failed to prepare secondary storage on host, secondary store url: " + secStoreUrl;
+                    String msg = String.format("Failed to prepare secondary storage on host, secondary store url: %s", secStoreUrl);

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5170: vmware: fix migrate vm with volume

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5170:
URL: https://github.com/apache/cloudstack/pull/5170#issuecomment-872533856


   <b>Trillian test result (tid-1185)</b>
   Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 33856 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5170-t1185-vmware-65u2.zip
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
   Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py
   Smoke tests completed. 85 look OK, 3 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_VPC_nics_after_destroy | `Error` | 5.65 | test_vpc_router_nics.py
   test_02_VPC_default_routes | `Error` | 5.62 | test_vpc_router_nics.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 8.39 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 6.33 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Failure` | 3.16 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 5.31 | test_vpc_vpn.py
   test_01_cancel_host_maintenace_with_no_migration_jobs | `Error` | 0.04 | test_host_maintenance.py
   test_02_cancel_host_maintenace_with_migration_jobs | `Error` | 0.03 | test_host_maintenance.py
   test_03_cancel_host_maintenace_with_migration_jobs_failure | `Error` | 0.03 | test_host_maintenance.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org