Invalid input writing to gnocchi

Bug #1970199 reported by Normen Scholtke
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ceilometer
New
Undecided
Unassigned

Bug Description

if i create an instance in openstack ceilometer has problems to write to gnocchi while creating a resource.
The Error message is looks like this.

Failed to create resource {'id': '6321a81f-f53c-4856-933a-74b2558e8b30', 'host': 'compute01', 'flavor_id': 36, 'flavor_name': 'small', 'user_id': '170f0b2147544ceabf821f500f640c41', 'project_id': '8d19da7ffc594f758ccdffee624b4ed7'}: gnocchiclient.exceptions.BadRequest: {'cause': 'Invalid input', 'reason': "expected str for dictionary value @ data['flavor_id']", 'detail': ['flavor_id']} (HTTP 400)
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi Traceback (most recent call last):
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi File "/var/lib/kolla/venv/lib/python3.8/site-packages/ceilometer/publisher/gnocchi.py", line 536, in _create_event
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi self._create_resource(resource_type, resource)
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi File "/var/lib/kolla/venv/lib/python3.8/site-packages/ceilometer/publisher/gnocchi.py", line 446, in _create_resource
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi self._gnocchi.resource.create(resource_type, resource)
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi File "/var/lib/kolla/venv/lib/python3.8/site-packages/gnocchiclient/v1/resource.py", line 95, in create
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi return self._post(
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi File "/var/lib/kolla/venv/lib/python3.8/site-packages/gnocchiclient/v1/base.py", line 41, in _post
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi return self.client.api.post(*args, **kwargs)
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi File "/var/lib/kolla/venv/lib/python3.8/site-packages/keystoneauth1/adapter.py", line 401, in post
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi return self.request(url, 'POST', **kwargs)
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi File "/var/lib/kolla/venv/lib/python3.8/site-packages/gnocchiclient/client.py", line 52, in request
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi raise exceptions.from_response(resp, method)
2022-04-25 10:48:41.024 68 ERROR ceilometer.publisher.gnocchi gnocchiclient.exceptions.BadRequest: {'cause': 'Invalid input', 'reason': "expected str for dictionary value @ data['flavor_id']", 'detail': ['flavor_id']} (HTTP 400)

i tried to debug the this a bit and saw that in the json
Failed to create resource {'id': '6321a81f-f53c-4856-933a-74b2558e8b30', 'host': 'compute01', 'flavor_id': 36, 'flavor_name': 'small', 'user_id': '170f0b2147544ceabf821f500f640c41', 'project_id': '8d19da7ffc594f758ccdffee624b4ed7'}

the flavor_id is not a string and on top of that it is not the correct ID of the flavor.

Revision history for this message
Michal Arbet (michalarbet) wrote :

Hi, it's very veird I also see this issue in my test environment (wallaby), did you fix somehow ?

Michal

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.