]> 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>
Wed, 29 Mar 2023 17:02:56 +0000 (13:02 -0400)
This will use the more efficient:

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

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/filesystem.py

index 8dbb576972b97ac3c5de505b45fd0848d959e624..d9ccfc51266b014234232258a4df600bc2096ee0 100644 (file)
@@ -1249,12 +1249,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