KeyError for alarm-history

Bug #1501958 reported by Chris P
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-ceilometerclient
Won't Fix
Undecided
Unassigned

Bug Description

A bug fix introduced a backwards incompatibility with icehouse ceilometer:

ceilometer --debug alarm-history -a f9bf90c7-59ba-4d3e-b9c5-ff3348e875e9

Traceback (most recent call last):
  File "/Users/chrisplo/src/python-ceilometerclient/build/lib/ceilometerclient/shell.py", line 306, in <module>
    main()
  File "/Users/chrisplo/src/python-ceilometerclient/build/lib/ceilometerclient/shell.py", line 293, in main
    CeilometerShell().main(args)
  File "/Users/chrisplo/src/python-ceilometerclient/build/lib/ceilometerclient/shell.py", line 242, in main
    args.func(client, args)
  File "/Users/chrisplo/src/python-ceilometerclient/build/lib/ceilometerclient/v2/shell.py", line 1052, in do_alarm_history
    sortby=None)
  File "/Users/chrisplo/src/python-ceilometerclient/build/lib/ceilometerclient/common/utils.py", line 67, in print_list
    sortby_index=sortby)
  File "/Users/chrisplo/src/python-ceilometerclient/build/lib/ceilometerclient/openstack/common/cliutils.py", line 173, in print_list
    row.append(formatters[field](o))
  File "/Users/chrisplo/src/python-ceilometerclient/build/lib/ceilometerclient/v2/shell.py", line 369, in alarm_change_detail_formatter
    fields.append('%s: %s' % (k, detail[k]))
KeyError: 'severity'

Introduced here:
https://github.com/openstack/python-ceilometerclient/blob/e9d76d460634702a627ad3a13fa37d9992772c4b/ceilometerclient/v2/shell.py#L361

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

it seems Icehouse is end of life in python-ceilometerclient, but Juno is affected as well because the severity is introduced in Kilo: https://review.openstack.org/#/c/142849/

Revision history for this message
Chris P (plockc) wrote :

i have a one-liner fix of defaulting missing keys to "N/A" will try submitting a pull request later tonight.

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

OK, go ahead, but I think the fix you mentioned might not enough to handle it, let's discuss it in review progress

Changed in python-ceilometerclient:
assignee: ZhiQiang Fan (aji-zqfan) → Chris P (plockc)
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/230272

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 ZhiQiang Fan (<email address hidden>) on branch: master
Review: https://review.openstack.org/230272
Reason: no active for over 2 months

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

icehouse is eol, no longer supported by upstream

Changed in python-ceilometerclient:
assignee: Chris P (plockc) → nobody
status: In Progress → Incomplete
status: Incomplete → Won't Fix
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.