** Also affects: nova/rocky
Importance: Undecided
Status: New
** Changed in: nova/rocky
Status: New => In Progress
** Changed in: nova/rocky
Importance: Undecided => Medium
** Changed in: nova/rocky
Assignee: (unassigned) => Matt Riedemann (mriedem)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1785339
Title:
RequestSpec.flavor is not reverted on resize revert
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) ocata series:
Confirmed
Status in OpenStack Compute (nova) pike series:
Confirmed
Status in OpenStack Compute (nova) queens series:
In Progress
Status in OpenStack Compute (nova) rocky series:
In Progress
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:
https://github.com/openstack/nova/blob/4c37ff72e5446c835a48d569dd5a1416fcd36c71/nova/conductor/manager.py#L313
https://github.com/openstack/nova/blob/4c37ff72e5446c835a48d569dd5a1416fcd36c71/nova/conductor/manager.py#L352
However, if the resize is reverted, we don't actually rollback the
RequestSpec.flavor to the previously flavor (instance.old_flavor):
https://github.com/openstack/nova/blob/4c37ff72e5446c835a48d569dd5a1416fcd36c71/nova/compute/api.py#L3322
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1785339/+subscriptions
--
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help : https://help.launchpad.net/ListHelp