执行命令 ceilometer resource-list
错误:
Internal Server Error (HTTP 500)
使用debug ceilometer --debug resource-list
输出:
DEBUG (session) REQ: curl -i -X GET http://172.16.101.2:5000/v2.0/ -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG (session) RESP: [200] {'date': 'Thu, 02 Jul 2015 03:24:05 GMT', 'content-type': 'application/json', 'content-length': '422', 'vary': 'X-Auth-Token', 'connection': 'close'}
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0", "links": [{"href": "http://172.16.101.2:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}
DEBUG (v2) Making authentication request to http://172.16.101.2:5000/v2.0/tokens
DEBUG (client) REQ: curl -i -X 'GET' 'http://25.0.0.2:8777/v2/resources' -H 'User-Agent: ceilometerclient.openstack.common.apiclient' -H 'X-Auth-Token: d9765e7ba93547f38911a5618cb5d4b9'
DEBUG (client) RESP: [500] {'date': 'Thu, 02 Jul 2015 03:24:06 GMT', 'content-length': '208', 'content-type': 'application/json', 'connection': 'keep-alive', 'server': 'WSGIServer/0.1 Python/2.7.5'}
DEBUG (client) RESP BODY: {"error_message": {"debuginfo": null, "faultcode": "Server", "faultstring": "database error: Runner error: Overflow sort stage buffered data usage of 33554586 bytes exceeds internal limit of 33554432 bytes"}}
DEBUG (client) Request returned failure status: 500
Traceback (most recent call last):
File "/usr/bin/ceilometer", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/ceilometerclient/shell.py", line 275, in main
CeilometerShell().main(args)
File "/usr/lib/python2.7/site-packages/ceilometerclient/shell.py", line 224, in main
args.func(client, args)
File "/usr/lib/python2.7/site-packages/ceilometerclient/v2/shell.py", line 716, in do_resource_list
resources = cc.resources.list(q=options.cli_to_array(args.query))
File "/usr/lib/python2.7/site-packages/ceilometerclient/v2/resources.py", line 35, in list
return self._list(options.build_url(path, q))
File "/usr/lib/python2.7/site-packages/ceilometerclient/common/base.py", line 59, in _list
resp = self.api.get(url)
File "/usr/lib/python2.7/site-packages/ceilometerclient/openstack/common/apiclient/client.py", line 334, in get
return self.client_request("GET", url, **kwargs)
File "/usr/lib/python2.7/site-packages/ceilometerclient/openstack/common/apiclient/client.py", line 328, in client_request
self, method, url, **kwargs)
File "/usr/lib/python2.7/site-packages/ceilometerclient/openstack/common/apiclient/client.py", line 244, in client_request
method, self.concat_url(endpoint, url), **kwargs)
File "/usr/lib/python2.7/site-packages/ceilometerclient/openstack/common/apiclient/client.py", line 184, in request
raise exceptions.from_response(resp, method, url)
ceilometerclient.openstack.common.apiclient.exceptions.InternalServerError: Internal Server Error (HTTP 500)
一个错误,/var/log/ceilometer/api.log
ERROR wsme.api [-] Server-side error: "database error: Runner error: Overflow sort stage buffered data usage of 33554586 bytes exceeds internal limit of 33554432 bytes". Detail:
预期结果,显示所有的资源信息
添加查询参数ceilometer resource-list -q resource_id=9af11e66-30ef-42cf-8f48-bc4bfb03cc03
或ceilometer resource-list -q project_id=3846bfe69b4a49948b8056d5f9c76859
结果正常
若需要显示全部,可以如下:
for project in $(keystone tenant-list | awk '/ True / {print $2}')
do
ceilometer resource-list -q project=$project | grep -vE '(\ -|Resource ID)'
done
出处:
https://review.openstack.org/#/c/66861/