]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: compare len(values) to len(categories) 45029/head
authorLaura Flores <lflores@redhat.com>
Wed, 2 Feb 2022 23:57:23 +0000 (23:57 +0000)
committerLaura Flores <lflores@redhat.com>
Mon, 14 Feb 2022 18:18:46 +0000 (18:18 +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>
(cherry picked from commit 5ac1dd6866287d9e5bc895a4028836d09c836069)

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