Sending empty allocations list on a PUT /allocations/{consumer_uuid} results in 500
Bug #1708260 reported by
Chris Dent
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Chris Dent | ||
Ocata |
Fix Committed
|
Medium
|
Chris Dent |
Bug Description
If you send an empty allocation list to the placement server:
- name: put an allocation empty list
PUT: /allocations/
request_headers:
content-type: application/json
data:
allocations: []
You'll get a 500 response because of an Index error when consumer_id = allocs[
Instead we should never reach this code. There should either be a schema violation, because we should have at least one allocation, or if we're willing to accept an empty list and do nothing, w should skip the call to the database.
To post a comment you must log in.
My feeling is this should be a 400 returned to the user, because this is probably not what they intended (maybe they typoed an assignment on their side)