bhouse-nexthop opened a new issue, #14751:
URL: https://github.com/apache/cloudstack/issues/14751

   ### problem
   
   `resizeVolume` with `automigrate=true` throws a NullPointerException when 
the volume has to move to another pool and `migrateVolume` returns no volume.
   
   | step | code |
   |---|---|
   | migration result | `volume = (result != null) ? 
_volsDao.findById(result.getId()) : null;` |
   | error built in the `try` | `volume.getUuid()` on a null `volume` |
   | error built in the `catch` | `volume.getUuid()` again, so the NPE escapes |
   
   `migrateVolume` returns null on the VM work-job path when the job result is 
not a volume id.
   
   `changeOfferingForVolume` has the same block. It does not NPE, but its 
message prints `volume: null` and names `suitableStoragePools.get(0)` instead 
of the pool that was tried.
   
   ### versions
   
   4.22 (the same code is on main).
   
   ### The steps to reproduce the bug
   
   1. Resize a volume attached to a VM so that its pool lacks space, with 
`automigrate=true`.
   2. Have the migrate job finish without returning a volume id.
   3. The API returns a NullPointerException instead of a migration error.
   
   ### What to do about it?
   
   Keep the original volume reference for the message, report the pool that was 
actually tried, and keep the migration failure as the cause.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [I] resizeVolume with automig... bhouse-nexthop (via GitHub) via commits

Reply via email to