From: Neeraj Pratap Singh Date: Thu, 17 Mar 2022 04:33:58 +0000 (+0530) Subject: mgr/stats: fetches client_metadata for multiple filesystems. X-Git-Tag: v18.0.0~957^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5a1c4875c1b95248c050fb1f6aff48af4553156d;p=ceph.git mgr/stats: fetches client_metadata for multiple filesystems. Signed-off-by: Neeraj Pratap Singh --- diff --git a/src/pybind/mgr/stats/fs/perf_stats.py b/src/pybind/mgr/stats/fs/perf_stats.py index 024d65124e50..b77d595b59f6 100644 --- a/src/pybind/mgr/stats/fs/perf_stats.py +++ b/src/pybind/mgr/stats/fs/perf_stats.py @@ -233,12 +233,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))