placement apis for inventory and allocations use insufficiently robust jsonschema
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
Medium
|
Dan Smith | ||
| Ocata |
Medium
|
Elod Illes |
Bug Description
In placement API v 1.4 it is possible to make inventories and allocations that pass the constraints of the jsonschema but are not correct according to the design of the system. If no values are provided, the defaults are incorrect as well:
inventories:
* It is possible to make inventories with with a min_unit or max_unit <= 0. min_unit and max_unit minimum should be 1.
* It is possible to create a step size that is <= 0. It's minimum should be 1.
* default for min_unit should be 1 not 0
* default for max_unit should be a big number not 0
* reserved and total need a minimum, probably of 0 and 1 respectively
allocations:
* resource consumption value must have a minimum of 1
Changed in nova: | |
importance: | Undecided → Medium |
Matt Riedemann (mriedem) wrote : | #1 |
Matt Riedemann (mriedem) wrote : | #2 |
Oh nevermind, 0 and 1, *respectively*.
Changed in nova: | |
assignee: | nobody → Ed Leafe (ed-leafe) |
Changed in nova: | |
status: | Triaged → In Progress |
Changed in nova: | |
assignee: | Ed Leafe (ed-leafe) → Dan Smith (danms) |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 6a6d021f818d614
Author: EdLeafe <email address hidden>
Date: Wed Jan 4 22:09:15 2017 +0000
Add check for invalid allocation amounts
This patch adds a check for the amounts in allocations passed to the
placement API, and returns an error if any amount is not greater than
zero.
Partial-Bug: #1673227
Change-Id: I2a8dc038d6489e
OpenStack Infra (hudson-openstack) wrote : | #4 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0b2d7c4d028104d
Author: EdLeafe <email address hidden>
Date: Fri Feb 3 15:32:55 2017 +0000
Add check for invalid inventory amounts
This patch adds sane minimum and maximums to the fields for an inventory
posting, which will quickly return a 400 error if invalid values are
passed instead of proceeding, only to fail at the DB layer.
Partial-Bug: #1673227
Change-Id: I6296cee6b8a4be
Chris Dent (cdent) wrote : | #5 |
The commits for this have merged, I guess the automation won't automate on partials (which makes sense).
Changed in nova: | |
status: | In Progress → Fix Released |
Fix proposed to branch: stable/ocata
Review: https:/
OpenStack Infra (hudson-openstack) wrote : | #7 |
Fix proposed to branch: stable/ocata
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 43ae6df96b85c0e
Author: EdLeafe <email address hidden>
Date: Wed Jan 4 22:09:15 2017 +0000
Add check for invalid allocation amounts
This patch adds a check for the amounts in allocations passed to the
placement API, and returns an error if any amount is not greater than
zero.
Partial-Bug: #1673227
Change-Id: I2a8dc038d6489e
(cherry picked from commit 6a6d021f818d614
tags: | added: in-stable-ocata |
OpenStack Infra (hudson-openstack) wrote : | #9 |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 3eb967784bbe1c1
Author: EdLeafe <email address hidden>
Date: Fri Feb 3 15:32:55 2017 +0000
Add check for invalid inventory amounts
This patch adds sane minimum and maximums to the fields for an inventory
posting, which will quickly return a 400 error if invalid values are
passed instead of proceeding, only to fail at the DB layer.
Conflicts:
nova/
Partial-Bug: #1673227
Change-Id: I6296cee6b8a4be
(cherry picked from commit 0b2d7c4d028104d
Elod Illes (elod-illes) wrote : | #10 |
The two partial fix (that together solve the bug) got merged. (automation only works for "closes-bug" according to previous comment)
"* reserved and total need a minimum, probably of 0 and 1 respectively"
reserved should not be a min of 1.