← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1823369] Re: _nova_check_type scheduler hint could be accidentally persisted during a rebuild with image change

 

Also, force_hosts/force_nodes could be accidentally persisted in this
case as well:

https://github.com/openstack/nova/blob/a6963fa6858289d048e4d27ce8e61637cd023f4c/nova/compute/api.py#L3337-L3338

** Also affects: nova/rocky
   Importance: Undecided
       Status: New

** Also affects: nova/stein
   Importance: Undecided
       Status: New

** Changed in: nova
   Importance: Medium => Undecided

-- 
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):
  In Progress
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


References