RequestSpec.flavor is not reverted on resize revert
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann | ||
Ocata |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Pike |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Queens |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Rocky |
Fix Committed
|
Medium
|
Matt Riedemann |
Bug Description
When we resize a server, we update the RequestSpec.flavor because for later move operations of the server, the RequestSpec is what gets passed to the scheduler, so naturally we need the RequestSpec.flavor to match the instance.flavor after the instance is resized. That happens here:
However, if the resize is reverted, we don't actually rollback the RequestSpec.flavor to the previously flavor (instance.
So consider this scenario:
1. create server with flavor 1
2. resize to server 2 (VERIFY_RESIZE status); at this point the RequestSpec.flavor is 2
3. revert the resize
4. live migrate, shelve/unshelve, evacuate or cold migrate the server - the request spec passed to the scheduler will have flavor 2 rather than flavor 1 which could cause misleading scheduling failures, e.g. if flavor 2 is bigger than flavor 1 and there is no capacity for flavor 2 on any hosts, the scheduler would raise NoValidHost.
Changed in nova: | |
assignee: | nobody → Matt Riedemann (mriedem) |
tags: | added: starlingx |
This has been broken since newton:
https:/ /github. com/openstack/ nova/commit/ 74ab427d4796d8a 386f84a15cc4918 8c2a60f8f1