GabrielBrascher commented on pull request #4282:
URL: https://github.com/apache/cloudstack/pull/4282#issuecomment-856936171
@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.
@shwstppr I think that it can happen with any hypervisor as long as one
migrate the VM, I saw this issue with KVM.
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.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]