finish_resize failures incorrectly revert allocations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann | ||
Pike |
Confirmed
|
Medium
|
Unassigned | ||
Queens |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Rocky |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Stein |
Fix Committed
|
Medium
|
Matt Riedemann |
Bug Description
While triaging bug 1821594 it got me thinking about handling placement allocations during resize when something fails, which got me thinking about an older fix:
https:/
Looking back on that now, I think the revert during resize_instance is OK as long as the instance host/node has not changed, but I think doing it when finish_resize fails was probably a mistake because the instance.host in the nova db won't match where the allocations exist in placement. Before Pike this was fine since the ResourceTracker would heal the allocations in the update_
So this could result in an instance reported as being on the dest host in the nova database with the new flavor, which is where it will get rebuilt/
Furthermore, if finish_resize fails, the instance should be in ERROR status and the user would likely try to hard reboot the instance to correct that status, which would happen on the dest host.
Gerrit is down but I've written a functional regression test to recreate the bug and attached it as a patch for now.