gnocchi REST api gives 404 Not found

asked 2017-07-06 04:02:58 -0600

Andrew Dodds gravatar image

Hi,

Whilst trying to get ceilometer to work with gnocchi in DevStack, on ceilometer-upgrade I get:

2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client [-] Gnocchi resource creation fail
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client Traceback (most recent call last):
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client   File "/opt/stack/ceilometer/ceilometer/gnocchi_client.py", line 123, in upgrade_resource_types
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client     gnocchi.resource_type.create(resource_type=rt)
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client   File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/v1/resource_type.py", line 35, in create
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client     data=ujson.dumps(resource_type)).json()
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client   File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/v1/base.py", line 41, in _post
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client     return self.client.api.post(*args, **kwargs)
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client   File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 193, in post
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client     return self.request(url, 'POST', **kwargs)
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client   File "/usr/local/lib/python2.7/dist-packages/gnocchiclient/client.py", line 39, in request
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client     raise exceptions.from_response(resp, method)
2017-07-06 08:47:31.156 24346 ERROR ceilometer.gnocchi_client NotFound: Not found (HTTP 404)

Added some debug and it was the URL:

'v1/resource_type/', ' Method:', 'POST')

That failed. Then tries using PostMan to send requests directly. Most of the Gnocchi REST API seems to be responding, i.e. GET http://my.ip:8041/v1/resource/generic works happily enough, but anything to do with resource types gives a 404 Not Found. It looks like since 'ceilometer-upgrade' can't create the resource types, no metrics are appearing in Gnocchi.

edit retag flag offensive close merge delete