aodh alarm create -t threshold should fail when with parameter aggregation method

Bug #1538831 reported by Xia Linjuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-aodhclient
Triaged
Low
ZhiQiang Fan

Bug Description

$ aodh alarm create -t threshold --name threshold_alarm5 --meter-name cpu --threshold 50 --description "description_threshold_alarm" --severity critical --ok-action "http://something/ok" --alarm-action "http://something/alarm" --insufficient-data-action "http://something/insufficient" --repeat-actions True --comparison-operator le --evaluation-periods 3 --granularity 60 --time-constraint 'name=cons1;start="0 11 * * *";duration=300;description="desc1"' --aggregation-method last

this command will be successful, but the threshold rule doesn't have this attribute. This command should fail.

The output is:

+---------------------------+--------------------------------------------------------------------------------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------------------------------------------------------------------------------+
| alarm_actions | [u'http://something/alarm'] |
| alarm_id | 5b3616e3-3f62-4e12-b9a0-e87f3ba086d8 |
| comparison_operator | le |
| description | description_threshold_alarm |
| enabled | True |
| evaluation_periods | 3 |
| exclude_outliers | False |
| insufficient_data_actions | [u'http://something/insufficient'] |
| meter_name | cpu |
| name | threshold_alarm5 |
| ok_actions | [u'http://something/ok'] |
| period | 60 |
| project_id | 97fcad0402ce4f65ac3bd42a0c6a7e74 |
| query | [] |
| repeat_actions | True |
| severity | critical |
| state | insufficient data |
| state_timestamp | 2016-01-28T02:39:41.867091 |
| statistic | avg |
| threshold | 50.0 |
| time_constraints | [{u'duration': 300, u'start': u'0 11 * * *', u'timezone': u'', u'description': u'desc1', u'name': u'cons1'}] |
| timestamp | 2016-01-28T02:39:41.867091 |
| type | threshold |
| user_id | f28735621ee84f329144eb467c91fce6 |
+---------------------------+--------------------------------------------------------------------------------------------------------------+

Xia Linjuan (ljxiash)
Changed in python-aodhclient:
assignee: nobody → Xia Linjuan (ljxiash)
Zi Lian Ji (jizilian)
Changed in python-aodhclient:
assignee: Xia Linjuan (ljxiash) → Zi Lian Ji (jizilian)
Revision history for this message
Zi Lian Ji (jizilian) wrote :

Hi Lin Juan

After https://review.openstack.org/#/c/266073/ is merged, the aodh client will validate and filter the corresponding parameters before sending the request to the back end.

Thanks

ZhiQiang Fan (aji-zqfan)
Changed in python-aodhclient:
assignee: Zi Lian Ji (jizilian) → nobody
ZhiQiang Fan (aji-zqfan)
Changed in python-aodhclient:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → ZhiQiang Fan (aji-zqfan)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.