From 02c4b4608286e8fd19d050772b132667229aa9db Mon Sep 17 00:00:00 2001 From: Neeraj Pratap Singh Date: Thu, 17 Mar 2022 10:03:58 +0530 Subject: [PATCH] mgr/stats: fetches client_metadata for multiple filesystems. Signed-off-by: Neeraj Pratap Singh (cherry picked from commit 5a1c4875c1b95248c050fb1f6aff48af4553156d) --- src/pybind/mgr/stats/fs/perf_stats.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/pybind/mgr/stats/fs/perf_stats.py b/src/pybind/mgr/stats/fs/perf_stats.py index 13d2adc8fc1..fcabeaf74c4 100644 --- a/src/pybind/mgr/stats/fs/perf_stats.py +++ b/src/pybind/mgr/stats/fs/perf_stats.py @@ -181,12 +181,16 @@ class FSPerfStats(object): new_updates = {} pending_updates = [v[0] for v in self.client_metadata['in_progress'].values()] with self.meta_lock: - for rank in rank_set: - if rank in pending_updates: - continue - tag = str(uuid.uuid4()) - result = CommandResult(tag) - new_updates[tag] = (rank, result) + fsmap = self.module.get('fs_map') + for fs in fsmap['filesystems']: + mdsmap = fs['mdsmap'] + for rank in rank_set: + gid = mdsmap['up']["mds_{0}".format(rank)] + if gid in pending_updates: + continue + tag = str(uuid.uuid4()) + result = CommandResult(tag) + new_updates[tag] = (gid, result) self.client_metadata['in_progress'].update(new_updates) self.log.debug("updating client metadata from {0}".format(new_updates)) -- 2.47.3