Custom Search

Monday, May 19, 2014

ceilometer alarm-list AttributeError: time_constraints devstack havana

Fix
====
* Checkout the tag "1.0.9" of python-ceilometerclient

a)
Check current branch
#git branch

b)
List all tags
#git tag -l

c)
Check current tag
#git describe --tags


d)
Checkout the tag "1.0.9"
#git checkout 1.0.9











Error
=====
#ceilometer --debug --os-username admin --os-password nova --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin alarm-list

DEBUG (session:249) REQ: curl -i -X POST http://localhost:5000/v2.0/tokens -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-keystoneclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "nova"}}}'
INFO (connectionpool:171) Starting new HTTP connection (1): localhost
DEBUG (connectionpool:344) "POST /v2.0/tokens HTTP/1.1" 200 9905
DEBUG (session:289) RESP: [200] CaseInsensitiveDict({'date': 'Mon, 19 May 2014 10:50:21 GMT', 'vary': 'X-Auth-Token', 'content-length': '9905', 'content-type': 'application/json'})

[{"alarm_actions": ["log://"], "ok_actions": [], "description": "instance running hot", "timestamp": "2014-05-19T10:35:55.590000", "enabled": true, "state_timestamp": "2014-05-19T10:36:23.373000", "threshold_rule": {"meter_name": "vcpus", "evaluation_periods": 3, "period": 600, "statistic": "avg", "threshold": 2.0, "query": [{"field": "resource_id", "type": "", "value": "0c9342d1-4970-4cb6-9ceb-88aa0a0d5e09", "op": "eq"}], "comparison_operator": "gt"}, "alarm_id": "861dbc3f-97b0-4424-81e6-9d8e218a86d6", "state": "ok", "insufficient_data_actions": [], "repeat_actions": false, "user_id": "d92d2b5304154aa69948d2ba17f14198", "project_id": "7d5e4a280ce3470eaffdba2b09fd4884", "type": "threshold", "name": "cpu_high"}]

Traceback (most recent call last):
  File "/usr/local/bin/ceilometer", line 10, in
    sys.exit(main())
  File "/opt/stack/python-ceilometerclient/ceilometerclient/shell.py", line 335, in main
    CeilometerShell().main(args)
  File "/opt/stack/python-ceilometerclient/ceilometerclient/shell.py", line 289, in main
    args.func(client, args)
  File "/opt/stack/python-ceilometerclient/ceilometerclient/v2/shell.py", line 284, in do_alarm_list
    'time_constraints': time_constraints_formatter}, sortby=0)
  File "/opt/stack/python-ceilometerclient/ceilometerclient/common/utils.py", line 65, in print_list
    sortby_index=sortby)
  File "/opt/stack/python-ceilometerclient/ceilometerclient/openstack/common/cliutils.py", line 154, in print_list
    row.append(formatters[field](o))
  File "/opt/stack/python-ceilometerclient/ceilometerclient/v2/shell.py", line 229, in time_constraints_formatter
    return _display_time_constraints(alarm.time_constraints)
  File "/opt/stack/python-ceilometerclient/ceilometerclient/v2/alarms.py", line 52, in __getattr__
    return super(Alarm, self).__getattr__(k)
  File "/opt/stack/python-ceilometerclient/ceilometerclient/openstack/common/apiclient/base.py", line 463, in __getattr__
    raise AttributeError(k)
AttributeError: time_constraints

No comments:

Post a Comment