]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/stats: fetches client_metadata for multiple filesystems.
authorNeeraj Pratap Singh <neesingh@redhat.com>
Thu, 17 Mar 2022 04:33:58 +0000 (10:03 +0530)
committerNeeraj Pratap Singh <neesingh@redhat.com>
Sun, 27 Mar 2022 14:40:03 +0000 (20:10 +0530)
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
src/pybind/mgr/stats/fs/perf_stats.py

index 024d65124e50a372451e2222d195dc4d7f3e628f..b77d595b59f6d31fe649c326d34e8706f3b1852c 100644 (file)
@@ -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))