conflict alarm name when alarm-create fail with 400 instead of 409
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
Low
|
ZhiQiang Fan |
Bug Description
# ceilometer alarm-create --meter instance --threshold 10 --name quota-alarm
# ceilometer --debug alarm-create --meter instance --threshold 10 --name quota-alarm
HTTP/1.0 400 Bad Request
date: Wed, 22 Jan 2014 12:16:46 GMT
content-length: 107
content-type: application/json
server: WSGIServer/0.1 Python/2.7.3
{"error_message": {"debuginfo": null, "faultcode": "Client", "faultstring": "Alarm with that name exists"}}
WARNING (http:168) Request returned failure status.
HTTPBadRequest (HTTP 400)
see:
https:/
https:/
there also is a 404 but return 500 for alarm not found:
https:/
Changed in ceilometer: | |
assignee: | nobody → ZhiQiang Fan (aji-zqfan) |
Changed in ceilometer: | |
status: | New → In Progress |
Changed in ceilometer: | |
importance: | Undecided → Low |
milestone: | none → icehouse-3 |
Changed in ceilometer: | |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | icehouse-3 → 2014.1 |
Reviewed: https:/ /review. openstack. org/68775 /git.openstack. org/cgit/ openstack/ ceilometer/ commit/ ?id=534608a53a7 485e35ca7a2819c baeb10894f05b4
Committed: https:/
Submitter: Jenkins
Branch: master
commit 534608a53a7485e 35ca7a2819cbaeb 10894f05b4
Author: ZhiQiang Fan <email address hidden>
Date: Thu Jan 23 17:36:38 2014 +0800
Use explicit http error code for api v2
* not exist should be 404
* conflict should be 409
* not authorized should be 401
Change-Id: Ied88290c42e567 9761e6d50073c79 65c5644f84e
Closes-Bug: #1271525