RodrigoDLopez commented on pull request #4282:
URL: https://github.com/apache/cloudstack/pull/4282#issuecomment-697931012


   Hi, @ravening can you report the methodology you used?
   * ACS version
   * How are you executing the tests? Are you migrating VMs running? Stopped 
VMs? Stopped VMs, and then starting them, and just then migrating again?
   
   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
   
https://github.com/apache/cloudstack/blob/d657ef7d5b4594b638eaf7df312b11efb99000fb/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java#L2282-L2283
   
   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


----------------------------------------------------------------
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]


Reply via email to