]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: compare len(values) to len(categories) 44746/head
authorLaura Flores <lflores@redhat.com>
Wed, 2 Feb 2022 23:57:23 +0000 (23:57 +0000)
committerLaura Flores <lflores@redhat.com>
Thu, 3 Feb 2022 00:03:07 +0000 (00:03 +0000)
This format will allow us to safely add or remove
categories as needed in the future.

Signed-off-by: Laura Flores <lflores@redhat.com>
src/pybind/mgr/telemetry/module.py

index 8ed73ffe5f61ff44307625f58e6e5a2c8b32ce20..b107e3b8e32c34e87da0fe44ab9aa20eb72b12af 100644 (file)
@@ -427,7 +427,7 @@ class Module(MgrModule):
                                   'spans_in_use',
                                   'thread_heaps_in_use',
                                   'tcmalloc_page_size']
-                    if len(values) != 12:
+                    if len(values) != len(categories):
                         self.log.debug('Received unexpected output from osd.{}; number of values should match the number of expected categories:\n' \
                                 'values: len={} {} ~ categories: len={} {} ~ outs: {}'.format(osd_id, len(values), values, len(categories), categories, outs))
                         continue