| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@RodrigoDLopez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Sorry, something went wrong.
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-1813 |
Sorry, something went wrong.
|
@blueorangutan test centos7 vmware-67u3 |
Sorry, something went wrong.
|
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
Sorry, something went wrong.
|
Trillian test result (tid-2576)
|
Sorry, something went wrong.
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Sorry, something went wrong.
|
Packaging result: ✖centos7 ✖centos8 ✖debian. JID-1905 |
Sorry, something went wrong.
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Sorry, something went wrong.
|
Packaging result: ✔centos7 ✖centos8 ✖debian. JID-1945 |
Sorry, something went wrong.
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Sorry, something went wrong.
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2045 |
Sorry, something went wrong.
There was a problem hiding this comment.
changes look good, starting tests on assorted platforms as I'm not sure this matters
Sorry, something went wrong.
|
@DaanHoogland a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware67, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
Sorry, something went wrong.
|
Trillian test result (tid-2818)
|
Sorry, something went wrong.
|
@RodrigoDLopez I tried migrating same vm like 10 times between 5 hypervisors and never got any NPE. Also the lost_host_id field was not cleared. |
Sorry, something went wrong.
|
Hi, @ravening can you report the methodology you used?
If you take a look at the code, a null pointer will for sure happen. Just look at the lines I am changing. Before this PR, the first migration will have host_id or last_host_id, but during the migrate, ACS will set the field last_host_id to null using the afterStorageMigrationCleanup method, and on the next executions of the migrate command (without starting the VM), this field will be null and then on this line, a NPE will be launched Furthermore, some of these parameters were never used for some hypervisors, seems like VMWare needs it, that is why I moved it where they will be used, and did the necessary validations providing information about the process with an appropriate log message |
Sorry, something went wrong.
@RodrigoDLopez im using ACS 4.14 I doing regular VM migration of running VM between multiple hosts. I didn't do migration with storage. Also I'm doing migration on KVM host and not VMware |
Sorry, something went wrong.
|
Hi @ravening, that was my fault.
with these steps, after the first migrate host_id and last_host_id will be set to null. And then, when you try to migrate it again a NPE will be thrown. |
Sorry, something went wrong.
@RodrigoDLopez ah ok... So you are just doing volume migration of VM...I will try these steps and let you know the result |
Sorry, something went wrong.
|
@rhtyd, @Ravenin, @DaanHoogland Hello guys, happy new year. Is there something missing here? Everything seems to be ok with the patch. It is a good bug fix, it has no errors, and tests are passing |
Sorry, something went wrong.
|
@ravening @rhtyd @harikrishna-patnala @nvazquez Hello everyone, this PR fixes a bug and is a simple change. |
Sorry, something went wrong.
Will review and test it this week |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good, I've left a few comments
Sorry, something went wrong.
|
@RodrigoDLopez do you want this on latest or on one of the release branches (4.14 or 4.15)? |
Sorry, something went wrong.
I will make this changes. Thanks for the hint |
Sorry, something went wrong.
For me, it's fine to be merged just on the master, since it's a nonreported bug. But if you wanna I can do the necessary changes to merge this fix on 4.14 as well @nvazquez @ravening @rhtyd @harikrishna-patnala |
Sorry, something went wrong.
|
@RodrigoDLopez can you fix the conflict? |
Sorry, something went wrong.
|
I just reproduced this very issue, this PR would be nice to have (4.15.2+, I think hat for 4.15.1 it is not feasible). |
Sorry, something went wrong.
|
I'm okay to get it in 4.15.1 if it's fixing the NPE. cc @shwstppr @Pearl1594 |
Sorry, something went wrong.
|
@GabrielBrascher were you able to reproduce this with 4.15.1 RC? |
Sorry, something went wrong.
|
@rhtyd we got it on a 4.15.0.0, but it seems that the codebase at 4.15.1.0 RC1 did not change at that point. Steps to reproduce: Case: migrate VM (e.g. for maintenance), keep VM stopped, try to migrate back the VM -> NullPointer 1. Migrate VM from host A to host B 2. VM stills stopped at host B 3. Try to migrate VM back to host A 4. Null pointer Stack trace: java.lang.NullPointerException
at com.cloud.vm.VirtualMachineManagerImpl.migrateThroughHypervisorOrStorage(VirtualMachineManagerImpl.java:2302)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:2194)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:5625)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
When checking the stack trace + DB it is possible to detect that the issue is indeed caused by the fact of last last_host_id being null, as reported by @RodrigoDLopez. |
Sorry, something went wrong.
|
@GabrielBrascher I've not tested yet and will try it tomorrow but I feel there has been a change in code that would prevent NPE that you shared, |
Sorry, something went wrong.
|
@RodrigoDLopez can you address the conflict? |
Sorry, something went wrong.
|
@shwstppr thanks for bringing those changes, I might have tested with 4.15.0.0 then instead of RC1. I will take another look at it. |
Sorry, something went wrong.
|
@rhtyd @RodrigoDLopez @shwstppr @DaanHoogland I have been running some tests on RC2 and I was not able to reproduce this issue with 4.15.1.0 RC2. This one looks to be fixed. |
Sorry, something went wrong.
|
Thanks for testing @GabrielBrascher, @RodrigoDLopez can you test 4.15.1.0 RC2? |
Sorry, something went wrong.
|
not needed anymore... |
Sorry, something went wrong.
|
@RodrigoDLopez why is this one not needed anymore? Was it addressed somewhere else? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
If a VM gets consecutive migrations, a null pointer exception is thrown because these VMs do not have host_id or last_host_id; ACS clears these fields when the first migration is over.
With that in mind, this PR prevents the respective null pointer. Additionally, it logs the right context and gives some information to the operator.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
To test this, I used the cloudmonkey to request migrateVirtualMachine commands