flavor extra_specs are not passed to any of the filters

Bug #1403547 reported by Nikola Đipanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Dan Smith

Bug Description

https://review.openstack.org/#/c/122557/7/nova/scheduler/utils.py broke this by removing the 2 lines that would make sure extra_specs are dug up from the DB before passing adding the instance_type to the request_spec, which eventually get's passed as part of the filter_properties (wrongfully, but that's a different bug) to all filters.

The fix is to either put this line back, or alternatively remove instance_type from the update call here:

https://github.com/openstack/nova/blob/fec5ff129465ab35ca8cc37fa8dafd368233b7b6/nova/scheduler/filter_scheduler.py#L119

The consequence is that AggregateInstanceExtraSpecsFilter, ComputeCapabilitiesFilter, TrustedFilter and trusted filters are broken in master since cb338cb7692e12cc94515f1f09008d0e328c1505

Tags: scheduler
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/142493

Changed in nova:
assignee: nobody → Dan Smith (danms)
status: Confirmed → In Progress
Revision history for this message
jiang, yunhong (yunhong-jiang) wrote :

Other than fix this issue, do we need some functional testing to cover them? If we take the flavor as a API, then it means we need have API functional testing to cover them?

Changed in nova:
milestone: none → kilo-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/142493
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=41cb43d5a53cfd9bc9a2d6f8e1abe252bcb48253
Submitter: Jenkins
Branch: master

commit 41cb43d5a53cfd9bc9a2d6f8e1abe252bcb48253
Author: Dan Smith <email address hidden>
Date: Wed Dec 17 08:41:25 2014 -0800

    Fix recent regression filling in flavor extra_specs

    In commit cb338cb7692e12cc94515f1f09008d0e328c1505, we dropped an extra
    DB query to fill in flavor extra_specs because the object should already
    have those set. However, if we pulled the flavor from the instance,
    extra_specs are mostly not stored, which means we effectively cut off
    the scheduler filters from access to those things.

    This adds that back in for that case, but only temporarily. Soon we will
    be merging a change to stash real flavor objects with the instance, which
    will make this moot. However, that may take a while to merge and this is
    broken now.

    Change-Id: Ia728025345b09687da9744004f0f47ad73ce196c
    Closes-Bug: #1403547

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.