From: Laura Flores Date: Wed, 2 Feb 2022 23:08:11 +0000 (+0000) Subject: mgr/telemetry: fix perf channel to screen out non-default pool applications X-Git-Tag: v17.1.0~11^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a479e08c3a4d38894da29447edf25a46ad571b06;p=ceph.git mgr/telemetry: fix perf channel to screen out non-default pool applications Signed-off-by: Laura Flores (cherry picked from commit 7467ed59aceb696e6682081dd03bbe8e9cccf789) --- diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index 9dd53f8dc9bba..66794b00f32e2 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -598,19 +598,15 @@ class Module(MgrModule): # collect application metadata from osd_map osd_map = self.get('osd_map') - app_dict = {} - for pool in osd_map['pools']: - app_dict[pool['pool']] = pool['application_metadata'] + application_metadata = {pool['pool']: pool['application_metadata'] for pool in osd_map['pools']} # add application to each pool from pg_dump for pool in result: - poolid = pool['poolid'] - # Check that the pool has an application. If it does not, - # the application dict will be empty. - if app_dict[poolid]: - pool['application'] = list(app_dict[poolid].keys())[0] - else: - pool['application'] = "" + pool['application'] = [] + # Only include default applications + for application in application_metadata[pool['poolid']]: + if application in ['cephfs', 'mgr', 'rbd', 'rgw']: + pool['application'].append(application) return result