Bug 1901385
Summary: | [OSP13] Nova API does not reject requests for 'os-aggregates' with invalid IDs | |||
---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | David Sedgmen <dsedgmen> | |
Component: | openstack-nova | Assignee: | Stephen Finucane <stephenfin> | |
Status: | CLOSED ERRATA | QA Contact: | OSP DFG:Compute <osp-dfg-compute> | |
Severity: | medium | Docs Contact: | ||
Priority: | low | |||
Version: | 13.0 (Queens) | CC: | apevec, dasmith, eglynn, jhakimra, jpichon, kchamart, lhh, sbauza, sgordon, smooney, stephenfin, vromanso | |
Target Milestone: | z14 | Keywords: | Triaged, ZStream | |
Target Release: | 13.0 (Queens) | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | openstack-nova-17.0.13-31.el7ost | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1902224 (view as bug list) | Environment: | ||
Last Closed: | 2021-03-18 13:09:23 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 1902224, 1902225 | |||
Bug Blocks: |
Description
David Sedgmen
2020-11-25 02:00:06 UTC
the os-aggreates api does not support doing a show by name https://docs.openstack.org/api-ref/compute/?expanded=show-aggregate-details-detail#show-aggregate-details show call GET /os-aggregates/{aggregate_id} where aggregate_id is the id the list endpoint support filtering via the name query arg /os-aggregates https://docs.openstack.org/api-ref/compute/?expanded=list-aggregates-detail#list-aggregates so GET /os-aggregates?name=7test is valid but GET /os-aggregates/7test is not a vaild api call. GET /v2.1/os-aggregates/7test should actully be retruning a 400 badrequest instead of a 404 but openstack show aggregate 8test is not a valid command. so there is a bug in that the nova api is not returning a 400 for the invalid request there is alos another bug the openstack client suggest that aggreate can be the name or id usage: openstack aggregate show [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN] [--noindent] [--prefix PREFIX] [--max-width <integer>] [--fit-width] [--print-empty] <aggregate> Display aggregate details positional arguments: <aggregate> Aggregate to display (name or ID) to support that osc shoudl be validating the input and determine if its an int or a name it shoudl then call the list endpoint with the name query arg. so really this is a openstack client bug with a hardening opportunity at the openstack api level. updating the componet to reflect that. OSC supports the use of names in operations like 'foo show' or 'foo list' by first making a request to the server's detail API with the provided string and, if the server rejects that query, making a second request to the server's list API. nova should be rejecting the former but isn't. We could harden OSC but this is a clear nova bug, first and foremost. well the nova bug would be not rejecting the requst with a 400 initally which we can do but it also an osc issue since osc is not passing the name query arg when it calls the list endpoint "GET /v2.1/os-aggregates HTTP/1.1" Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat OpenStack Platform 13.0 bug fix and enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:0932 |