Ceilometer AttributeError: 'unicode' object has no attribute 'iteritems'
Hi!
I installed ceilometer in our lab environment. When I try to open the resource usage on dashboard, or do a list command with cli I've got the following error:
AttributeError: 'unicode' object has no attribute 'iteritems'
CLI debug output:
ubuntu@kvm5:~$ ceilometer -d meter-list
DEBUG (session) REQ: curl -g -i -X GET http://vip.mgmt.lab.intra:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG (session) RESP: [200] content-length: 352 x-distribution: Ubuntu vary: X-Auth-Token server: Apache/2.4.7 (Ubuntu) date: Mon, 11 Jan 2016 09:46:09 GMT content-type: application/json x-openstack-request-id: req-ab856ae4-7852-4870-89ab-0e3417328c51
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://vip.mgmt.lab.intra:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}
DEBUG (v2) Making authentication request to http://vip.mgmt.lab.intra:5000/v2.0/tokens
DEBUG (client) REQ: curl -g -i -X 'GET' 'http://vip.mgmt.lab.intra:8777/v2/meters' -H 'User-Agent: ceilometerclient.openstack.common.apiclient' -H 'X-Auth-Token: {SHA1}99a5695572cb65bb5d4886d168349704a333d7e0'
DEBUG (client) RESP: [300] CaseInsensitiveDict({'date': 'Mon, 11 Jan 2016 09:46:10 GMT', 'content-length': '133', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-35942073-9987-4e4c-ac16-2677020ba0c9'})
DEBUG (client) RESP BODY: {"versions": [{"status": "CURRENT", "id": "v1.0", "links": [{"href": "http://vip.mgmt.lab.intra:8777/v1/", "rel": "self"}]}]}
Traceback (most recent call last):
File "/usr/bin/ceilometer", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.7/dist-packages/ceilometerclient/shell.py", line 297, in main
CeilometerShell().main(args)
File "/usr/lib/python2.7/dist-packages/ceilometerclient/shell.py", line 246, in main
args.func(client, args)
File "/usr/lib/python2.7/dist-packages/ceilometerclient/v2/shell.py", line 234, in do_meter_list
meters = cc.meters.list(q=options.cli_to_array(args.query))
File "/usr/lib/python2.7/dist-packages/ceilometerclient/v2/meters.py", line 30, in list
return self._list(options.build_url(path, q))
File "/usr/lib/python2.7/dist-packages/ceilometerclient/common/base.py", line 85, in _list
return [obj_class(self, res, loaded=True) for res in data if res]
File "/usr/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/base.py", line 458, in __init__
self._add_details(info)
File "/usr/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/base.py", line 479, in _add_details
for (k, v) in six.iteritems(info):
File "/usr/lib/python2.7/dist-packages/six.py", line 576, in iteritems
return iter(d.iteritems(**kw))
AttributeError: 'unicode' object has no attribute 'iteritems'
It's very strange that in the last response the API version seems to be v1.0 but it's deprecated and the requests go to V2 so I really don't understand what is going on.
My config file without the passwords:
[DEFAULT]
verbose = False
debug = True
auth_strategy = keystone
[api]
port = 8777
host = 192.168.56.20
[coordination]
backend_url = redis://controller1.mgmt.lab.intra:26379?sentinel=telemetry_cluster&sentinel_fallback=controller3.mgmt.lab.intra:26379&sentinel_fallback=controller2.mgmt.lab.intra:26379
heartbeat = 3.0
[database]
metering_time_to_live = 604800 ...