Trove API create/update calls cannot have empty host strings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
Fix Released
|
High
|
Tim Simpson |
Bug Description
The trove api create/update calls should throw a BadRequest in case of empty host strings.
For example:
In case of modify user attributes API,
if the client sends an empty host attribute, the API accepts it; however, the API will no longer find the user on the next requests.
Send an update containing an empty host:
$ curl \
--request PUT "https:/
--data "{ \"user\" : { \"host\": \"\" } }" \
--header "Content-Type: application/json" \
--header "X-Auth-Token: 7e08297922a2457
--insecure \
--write-out "http_code=
It returns 202.
If you try to update it again or delete the user, it returns:
{"itemNotFound": {"message": "User gandalf cannot be found on the instance.", "code": 404}}
This triggers the need to explicitly throw a BadRequest in case a empty host string is specified.
Changed in trove: | |
assignee: | nobody → Riddhi (ridhi-j-shah) |
Changed in trove: | |
status: | New → In Progress |
Changed in trove: | |
milestone: | none → havana-rc1 |
Changed in trove: | |
assignee: | Riddhi (ridhi-j-shah) → Tim Simpson (tim-simpson) |
Changed in trove: | |
importance: | Undecided → High |
Changed in trove: | |
status: | Fix Committed → Fix Released |
Changed in trove: | |
milestone: | havana-rc1 → 2013.2 |
Fix proposed to branch: master /review. openstack. org/43005
Review: https:/