ceilometer alarm-history should throw error when alarm id is invalid

Bug #1461458 reported by sonu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ceilometerclient
In Progress
Undecided
Abhishek Talwar

Bug Description

when I execute 'ceilometer alarm-histoy' command with invalid alarm-id '123' error is not thrown whereas when I use the same
alarm id with 'ceilometer alarm-show ' command an error is thrown.

$ ceilometer alarm-list
+--------------------------------------+--------+-------------------+----------+---------+------------+---------------------------------+------------------+
| Alarm ID | Name | State | Severity | Enabled | Continuous | Alarm condition | Time constraints |
+--------------------------------------+--------+-------------------+----------+---------+------------+---------------------------------+------------------+
| 20369539-e6df-428d-b5c1-f5a4da40a4e6 | cpu-hi | insufficient data | low | True | False | cpu_util > 50.0 during 2 x 120s | None |
+--------------------------------------+--------+-------------------+----------+---------+------------+---------------------------------+------------------+

$ ceilometer alarm-history 123
+------+-----------+--------+
| Type | Timestamp | Detail |
+------+-----------+--------+
+------+-----------+--------+

but if we execute alarm-show command with id "123"

dev@vyom:~$ ceilometer alarm-show 123
Alarm 123 not found (HTTP 404) (Request-ID: req-a72c4a50-90f6-4714-87c4-95555ab4f1e9)

I think appropriate error should be thrown when invalid alarm ID is provided as an argument to 'ceilometer alarm-history ' command .

sonu (sonu-bhumca11)
Changed in python-ceilometerclient:
assignee: nobody → sonu (sonu-bhumca11)
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

if an alarm is created but never change it state after some time which longer than alarm history ttl, then the alarm exists but have no alarm history
I think just return an empty result is acceptable

Changed in python-ceilometerclient:
assignee: sonu (sonu-bhumca11) → Abhishek Talwar (abhishek-talwar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ceilometerclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/315361

Changed in python-ceilometerclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-ceilometerclient (master)

Change abandoned by Julien Danjou (<email address hidden>) on branch: master
Review: https://review.openstack.org/315361
Reason: Project is closed.

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.