Public bug reported:

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

** Affects: nova
     Importance: Low
         Status: Triaged


** Tags: conductor scheduler

** Tags removed: sch
** Tags added: scheduler

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

** Changed in: nova
       Status: New => Triaged

-- 
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):
  Triaged

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

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

Reply via email to