fail parameter validation in pecan shouldn't raise HTTPInternalServerError
Bug #1320430 reported by
Liusheng
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
Medium
|
Unassigned | ||
Juno |
Fix Released
|
Medium
|
Eoghan Glynn | ||
python-ceilometerclient |
In Progress
|
Undecided
|
Unassigned |
Bug Description
Currently , ceilometer use wsmeext.pecan to validate some parameters of a model (such as Alarm), but if parameter validation fails, ceilometer will raise HTTPInternalSer
Mostly it should raise BadRequest error. e.g.
ceilometer --debug alarm-threshold
it returns:
ceilometerclien
Changed in ceilometer: | |
assignee: | nobody → Liusheng (liusheng) |
description: | updated |
tags: | added: alarm |
tags: | removed: alarm |
description: | updated |
Changed in ceilometer: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in python-ceilometerclient: | |
assignee: | nobody → Pradyumna Sampath (pradysam) |
Changed in ceilometer: | |
assignee: | Liusheng (liusheng) → Pradyumna Sampath (pradysam) |
status: | Triaged → In Progress |
Changed in python-ceilometerclient: | |
status: | New → In Progress |
Changed in ceilometer: | |
milestone: | none → kilo-1 |
tags: | added: juno-backport-potential |
tags: | removed: juno-backport-potential |
Changed in ceilometer: | |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | kilo-1 → 2015.1.0 |
To post a comment you must log in.
Hi Eoghan et al
We've been looking this bug and here are some comments.
I think there could (should?) be 2 approaches to this ceilometerclien t to not accept anything else apart from one of the ALARM_STATES (defined in python- ceilometerclien t/ceilometercli ent/v2/ shell.py) ceilometer/ api/controllers /v2.py) (within the call "_set"
(1) To validate input to python-
(2) To validate input within ceilometer api code to throw a "BadRequest.." (ceilometer/
Perhaps its a good idea to do both of the above. Is this a right approach ?