[Bug 1971753] [NEW] New resources are unable to be created in gnocchi after upgrade to Yoga
Tristan Zhang
1971753 at bugs.launchpad.net
Thu May 5 17:30:06 UTC 2022
Public bug reported:
After upgrade from Ussuri to Yoga, ceilometer doesn't work properly.
Metric measures are generated for old servers. But for new created
servers, metric measures are unable to be published to gnocchi.
The issue happens in batch_measures function:
def batch_measures(self, measures, resource_infos):
# NOTE(sileht): We don't care about error here, we want
# resources metadata always been updated
try:
self._gnocchi.metric.batch_resources_metrics_measures(
measures, create_metrics=True)
except gnocchi_exc.BadRequest as e:
if not isinstance(e.message, dict):
LOG.debug("Tristan: if not isinstance ")
raise
if e.message.get('cause') != 'Unknown resources':
LOG.debug("Tristan: if cause != Unknown resources ")
raise
Here we test if e.message is a dict. In my case ceilometer gets a message with a dict. But for some reason the character "'" in the exception message from gnocchi-api is converted to "'", that breaks this part of code.
Errors in notification logs:
2022-05-04 17:02:45.762 20 ERROR ceilometer.publisher.gnocchi [-] <html>
<head>
<title>400 Bad Request</title>
</head>
<body>
<h1>400 Bad Request</h1>
The server could not comply with the request since it is either malformed or otherwise incorrect.<br /><br />
{'cause': 'Unknown resources', 'detail': [{'resource_id': '23c43227-0f8c-5da1-b367-9abd5be48a00', 'original_resource_id':'36f2c1be-50b6-4b58-b91f-b9153e28855a-hda'}, {'resource_id': 'e8e
033d7-f774-5026-a0d2-a06153b99ec3', 'original_resource_id': '36f2c1be-50b6-4b58-b91f-b9153e28855a-vda'}, {'resource_id': '87feb8f9-cff5-5118-9e85-ec3747111cfc', 'original_resource_id': '67171b6e-1147-4084-8ba3-ed352d4f4238-vda'}]}
** Affects: ceilometer (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to ceilometer in Ubuntu.
https://bugs.launchpad.net/bugs/1971753
Title:
New resources are unable to be created in gnocchi after upgrade to
Yoga
Status in ceilometer package in Ubuntu:
New
Bug description:
After upgrade from Ussuri to Yoga, ceilometer doesn't work properly.
Metric measures are generated for old servers. But for new created
servers, metric measures are unable to be published to gnocchi.
The issue happens in batch_measures function:
def batch_measures(self, measures, resource_infos):
# NOTE(sileht): We don't care about error here, we want
# resources metadata always been updated
try:
self._gnocchi.metric.batch_resources_metrics_measures(
measures, create_metrics=True)
except gnocchi_exc.BadRequest as e:
if not isinstance(e.message, dict):
LOG.debug("Tristan: if not isinstance ")
raise
if e.message.get('cause') != 'Unknown resources':
LOG.debug("Tristan: if cause != Unknown resources ")
raise
Here we test if e.message is a dict. In my case ceilometer gets a message with a dict. But for some reason the character "'" in the exception message from gnocchi-api is converted to "'", that breaks this part of code.
Errors in notification logs:
2022-05-04 17:02:45.762 20 ERROR ceilometer.publisher.gnocchi [-] <html>
<head>
<title>400 Bad Request</title>
</head>
<body>
<h1>400 Bad Request</h1>
The server could not comply with the request since it is either malformed or otherwise incorrect.<br /><br />
{'cause': 'Unknown resources', 'detail': [{'resource_id': '23c43227-0f8c-5da1-b367-9abd5be48a00', 'original_resource_id':'36f2c1be-50b6-4b58-b91f-b9153e28855a-hda'}, {'resource_id': 'e8e
033d7-f774-5026-a0d2-a06153b99ec3', 'original_resource_id': '36f2c1be-50b6-4b58-b91f-b9153e28855a-vda'}, {'resource_id': '87feb8f9-cff5-5118-9e85-ec3747111cfc', 'original_resource_id': '67171b6e-1147-4084-8ba3-ed352d4f4238-vda'}]}
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceilometer/+bug/1971753/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list