← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1727855] Re: conductor rebuild_instance does not properly handle image_ref if request_spec is not provided

 

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

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

** Changed in: nova/ocata
       Status: New => Confirmed

** Changed in: nova/pike
       Status: New => Confirmed

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

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

-- 
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/1727855

Title:
  conductor rebuild_instance does not properly handle image_ref if
  request_spec is not provided

Status in OpenStack Compute (nova):
  In Progress
Status in OpenStack Compute (nova) ocata series:
  Confirmed
Status in OpenStack Compute (nova) pike series:
  Confirmed

Bug description:
  Maybe this doesn't actually matter for rebuild, but the image_ref used
  in this code:

  https://github.com/openstack/nova/blob/d36dcd52c24c32418fd358d245688c86664025d5/nova/conductor/manager.py#L830

  Is a string image id, it's not a dict or ImageMeta object, it comes
  through the rebuild action API from the user.

  It's important, however, for how scheduler_utils.build_request_spec
  uses it here:

  https://github.com/openstack/nova/blob/d36dcd52c24c32418fd358d245688c86664025d5/nova/scheduler/utils.py#L79

  Because I was trying to figure out if the image parameter to
  build_request_spec is an ImageMeta object, dict or string - since the
  code appears to assume it's a dict if not provided.

  Conductor will then call RequestSpec.from_primitives and the image is
  used here:

  https://github.com/openstack/nova/blob/d36dcd52c24c32418fd358d245688c86664025d5/nova/objects/request_spec.py#L250

  And eventually ignored here since it's an unexpected type:

  https://github.com/openstack/nova/blob/d36dcd52c24c32418fd358d245688c86664025d5/nova/objects/request_spec.py#L135

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1727855/+subscriptions


References