project id is missing for alarm create
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-ceilometerclient |
Fix Released
|
Undecided
|
ZhiQiang Fan |
Bug Description
with latest devstack, ceilometer, python-
$ ceilometer --debug alarm-threshold
DEBUG (client) REQ: curl -i -X 'POST' 'http://
DEBUG (client) REQ BODY: {"threshold_rule": {"threshold": 1.0, "meter_name": "instance"}, "project_id": "", "type": "threshold", "name": "test-project-id", "repeat_actions": false}
+------
| Property | Value |
+------
| alarm_actions | [] |
| alarm_id | f8910e62-
| comparison_operator | eq |
| description | Alarm when instance is eq a avg of 1.0 over 60 seconds |
| enabled | True |
| evaluation_periods | 1 |
| exclude_outliers | False |
| insufficient_
| meter_name | instance |
| name | test-project-id |
| ok_actions | [] |
| period | 60 |
| project_id | |
| query | |
| repeat_actions | False |
| state | insufficient data |
| statistic | avg |
| threshold | 1.0 |
| type | threshold |
| user_id | dddb336a7f9740b
+------
Note that project_id is '', actually it should be the admin's project_id
This is because the AuthPlugin we introduced recently, which sets project_id in class attribute opt_names, which will be added to cli_argument with default value '' in openstack/
Changed in python-ceilometerclient: | |
assignee: | nobody → ZhiQiang Fan (aji-zqfan) |
Changed in python-ceilometerclient: | |
assignee: | ZhiQiang Fan (aji-zqfan) → gordon chung (chungg) |
Changed in python-ceilometerclient: | |
assignee: | gordon chung (chungg) → ZhiQiang Fan (aji-zqfan) |
Changed in python-ceilometerclient: | |
milestone: | none → 1.3.0 |
status: | Fix Committed → Fix Released |
This is an issue for alarm-threshold -update as well.
DEBUG (client) REQ: curl -i -X 'PUT' 'http:// 192.168. 126.129: 8777/v2/ alarms/ 4cd967cb- 74c3-4526- a8f2-899ca7dc45 b6' -H 'User-Agent: ceilometerclien t.openstack. common. apiclient' -H 'Content-Type: application/json' -H 'X-Auth-Token: 9596702b97f74d3 4a961116f6b65d0 ac' 20T18:34: 40.105478" , "enabled": true, "state_timestamp": "2014-11- 20T18:45: 17.286697" , "threshold_rule": {"meter_name": "image", "evaluation_ periods" : 1, "period": 60, "statistic": "avg", "threshold": 10.0, "query": [], "comparison_ operator" : "eq", "exclude_outliers": false}, "alarm_id": "4cd967cb- 74c3-4526- a8f2-899ca7dc45 b6", "time_constraints": [], "insufficient_ data_actions" : [], "repeat_actions": false, "user_id": "ea9817c1e4d246 8daede7d586de4c 8c6", "project_id": "", "type": "threshold", "description": "test alarm created with project-id"}
DEBUG (client) REQ BODY: {"alarm_actions": [], "ok_actions": [], "name": "alarm3", "state": "ok", "timestamp": "2014-11-