Public bug reported: This is based on code inspection and related to bug 1815153 (see comments 1-4) but when we rebuild a server with a new image we go through the scheduler with a special scheduler hint:
https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/compute/api.py#L3336 This line is meant to avoid accidentally persisting that change: https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/compute/api.py#L3329 But RequestSpec.save() doesn't use the id field, it looks up the RequestSpec from the DB using the instance_uuid field to save the changes: https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/objects/request_spec.py#L619 Which means we could accidentally persist that scheduler hint here if we are 'healing' a volume-backed server (since Rocky): https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/conductor/manager.py#L1009 The potential fallout from this is that future move operations of that server could only run a subset of the scheduler filters: https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/scheduler/manager.py#L125 And not even call placement... ** Affects: nova Importance: Undecided Status: New ** Affects: nova/rocky Importance: Undecided Status: New ** Affects: nova/stein Importance: Undecided Status: New ** Tags: rebuild request-spec -- 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/1823369 Title: _nova_check_type scheduler hint could be accidentally persisted during a rebuild with image change Status in OpenStack Compute (nova): New Status in OpenStack Compute (nova) rocky series: New Status in OpenStack Compute (nova) stein series: New Bug description: This is based on code inspection and related to bug 1815153 (see comments 1-4) but when we rebuild a server with a new image we go through the scheduler with a special scheduler hint: https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/compute/api.py#L3336 This line is meant to avoid accidentally persisting that change: https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/compute/api.py#L3329 But RequestSpec.save() doesn't use the id field, it looks up the RequestSpec from the DB using the instance_uuid field to save the changes: https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/objects/request_spec.py#L619 Which means we could accidentally persist that scheduler hint here if we are 'healing' a volume-backed server (since Rocky): https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/conductor/manager.py#L1009 The potential fallout from this is that future move operations of that server could only run a subset of the scheduler filters: https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/scheduler/manager.py#L125 And not even call placement... To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1823369/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp