]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cephfs: use rank_asok and allow specifying rank
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 20 Jan 2023 23:20:15 +0000 (18:20 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 30 Mar 2023 12:40:49 +0000 (08:40 -0400)
This will use the more efficient:

    ceph tell mds.<fsname>:<rank> ...

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 3ba17390e92c21a3eba7337a2da0df79f6bf49ca)

qa/tasks/cephfs/filesystem.py

index 35b80106dc8c5ab1976078cdfc82f0a3e7285f80..b6adf9a6165ea8ff0e9e97d968cc63a6f0dc23bf 100644 (file)
@@ -1233,12 +1233,12 @@ class Filesystem(MDSCluster):
             out.append((rank, f(perf)))
         return out
 
-    def read_cache(self, path, depth=None):
+    def read_cache(self, path, depth=None, rank=None):
         cmd = ["dump", "tree", path]
         if depth is not None:
             cmd.append(depth.__str__())
-        result = self.mds_asok(cmd)
-        if len(result) == 0:
+        result = self.rank_asok(cmd, rank=rank)
+        if result is None or len(result) == 0:
             raise RuntimeError("Path not found in cache: {0}".format(path))
 
         return result