Uh oh!
There was an error while loading. Please reload this page.
vmware: fix migrate vm with volume - #5170
Conversation
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. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
| 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()); |
There was a problem hiding this comment.
@shwstppr might sourceHyperHost be null as well ?
There was a problem hiding this 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
There was a problem hiding this comment.
@shwstppr great, thanks.
no idea if it breaks some features. at least the NPE is fixed by this pr.
There was a problem hiding this comment.
Above ^^ is my understanding. Let me know if there should be additional checks @weizhouapache
There was a problem hiding this comment.
Change was originally introduced here, d2ab350
There was a problem hiding this comment.
@shwstppr if the origin is a merge commit than this should be fixed on the older branch and merged forward.
shwstppr
commented
Jun 30, 2021
@blueorangutan package |
blueorangutan
commented
Jun 30, 2021
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Jun 30, 2021
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 432 |
weizhouapache
commented
Jun 30, 2021
@blueorangutan test centos7 vmware-65u2 |
blueorangutan
commented
Jun 30, 2021
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests |
DaanHoogland
left a comment
There was a problem hiding this comment.
clgtm but please change base branch to 4.15
| 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()); |
There was a problem hiding this comment.
@shwstppr if the origin is a merge commit than this should be fixed on the older branch and merged forward.
shwstppr
commented
Jun 30, 2021
@DaanHoogland 4.15 has a different code. Change that resulted in error was added in d2ab350 to probably address merge conflicts cc @nvazquez |
@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 And since the |
shwstppr
commented
Jul 1, 2021
@blueorangutan test centos7 vmware-65u2 |
blueorangutan
commented
Jul 1, 2021
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests |
blueorangutan
commented
Jul 1, 2021
Trillian test result (tid-1185)
|
blueorangutan
commented
Jul 2, 2021
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 455 |
shwstppr
commented
Jul 2, 2021
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 |
blueorangutan
commented
Jul 2, 2021
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests |
shwstppr
commented
Jul 4, 2021
@blueorangutan test centos7 vmware-65u2 |
blueorangutan
commented
Jul 4, 2021
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests |
blueorangutan
commented
Jul 5, 2021
Trillian test result (tid-1198)
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…vmware/resource/VmwareResource.java Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
shwstppr
commented
Jul 5, 2021
@blueorangutan package |
blueorangutan
commented
Jul 5, 2021
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Jul 5, 2021
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 476 |
shwstppr
commented
Jul 5, 2021
@blueorangutan test centos7 vmware-65u2 |
blueorangutan
commented
Jul 5, 2021
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests |
blueorangutan
commented
Jul 6, 2021
Trillian test result (tid-1206)
|
weizhouapache
left a comment
There was a problem hiding this comment.
code lgtm
(did not look through the code changes in debug messages).
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.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?