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 />
{&#x27;cause&#x27;: &#x27;Unknown resources&#x27;, &#x27;detail&#x27;: 
[{&#x27;resource_id&#x27;: &#x27;23c43227-0f8c-5da1-b367-9abd5be48a00&#x27;, 
&#x27;original_resource_id&#x27;:&#x27;36f2c1be-50b6-4b58-b91f-b9153e28855a-hda&#x27;},
 {&#x27;resource_id&#x27;: &#x27;e8e
033d7-f774-5026-a0d2-a06153b99ec3&#x27;, &#x27;original_resource_id&#x27;: 
&#x27;36f2c1be-50b6-4b58-b91f-b9153e28855a-vda&#x27;}, 
{&#x27;resource_id&#x27;: &#x27;87feb8f9-cff5-5118-9e85-ec3747111cfc&#x27;, 
&#x27;original_resource_id&#x27;: 
&#x27;67171b6e-1147-4084-8ba3-ed352d4f4238-vda&#x27;}]}

** Affects: ceilometer (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1971753

Title:
  New resources are unable to be created in gnocchi after upgrade to
  Yoga

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceilometer/+bug/1971753/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to