placement API allocation handling does not check min_unit, max_unit, step_size

Bug #1623545 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Chris Dent

Bug Description

The min_unit, max_unit and step_size values of resource provider inventory are not checked when submitting allocations. Only available capacity.

This is a known issue, a deliberate decision was made to put it off until later, but we need to record the presence of the issue. What's suppose to happen is that in addition to checking capacity, we also want to make sure that the allocation is between min_unit and max_unit and cleanly divisible by step_size. These checks should happen in the OVO code, not the API level.

Revision history for this message
Matt Riedemann (mriedem) wrote :

By OVO code I'm assuming you mean the check should happen somewhere down in here:

https://github.com/openstack/nova/blob/c651572d5acd8838b1c1c0be1eeee11414205c57/nova/objects/resource_provider.py#L810

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Chris Dent (cdent) wrote :

Yes Matt, that's pretty much the place.

Ukesh (ukeshkumar)
Changed in nova:
assignee: nobody → Ukesh (ukeshkumar)
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/392933

Changed in nova:
assignee: Ukesh (ukeshkumar) → Chris Dent (cdent)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit b000989635be95a1548a983d290d16492b436571
Author: Chris Dent <email address hidden>
Date: Wed Nov 2 18:42:21 2016 +0000

    [placement] Enforce min_unit, max_unit and step_size

    Add support for checking min_unit, max_unit and step_size when
    making allocations to the placement API. When the constraints are
    violated a new exception InvalidAllocationConstraintsViolated is
    raised.

    Change-Id: I18596a3c0f2b0049aaccd0f3e73aef90b684c4a8
    Closes-Bug: #1623545

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.0.0b1

This issue was fixed in the openstack/nova 15.0.0.0b1 development milestone.

Revision history for this message
Matt Riedemann (mriedem) wrote :

We might want to backport this to stable/newton, I haven't decided yet.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/416760

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/newton)

Reviewed: https://review.openstack.org/416760
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=41f9f42745a6bf786984fa86f64538a98740c0a9
Submitter: Jenkins
Branch: stable/newton

commit 41f9f42745a6bf786984fa86f64538a98740c0a9
Author: Chris Dent <email address hidden>
Date: Wed Nov 2 18:42:21 2016 +0000

    [placement] Enforce min_unit, max_unit and step_size

    Add support for checking min_unit, max_unit and step_size when
    making allocations to the placement API. When the constraints are
    violated a new exception InvalidAllocationConstraintsViolated is
    raised.

    Change-Id: I18596a3c0f2b0049aaccd0f3e73aef90b684c4a8
    Closes-Bug: #1623545
    (cherry picked from commit b000989635be95a1548a983d290d16492b436571)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 14.0.5

This issue was fixed in the openstack/nova 14.0.5 release.

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.