From: Patrick Donnelly Date: Fri, 20 Jan 2023 23:20:15 +0000 (-0500) Subject: qa/tasks/cephfs: use rank_asok and allow specifying rank X-Git-Tag: v18.1.0~33^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=07284ebbc34471569e3f574cbe8760adff3f1ca2;p=ceph.git qa/tasks/cephfs: use rank_asok and allow specifying rank This will use the more efficient: ceph tell mds.: ... Signed-off-by: Patrick Donnelly (cherry picked from commit 3ba17390e92c21a3eba7337a2da0df79f6bf49ca) --- diff --git a/qa/tasks/cephfs/filesystem.py b/qa/tasks/cephfs/filesystem.py index 8dbb576972b9..d9ccfc51266b 100644 --- a/qa/tasks/cephfs/filesystem.py +++ b/qa/tasks/cephfs/filesystem.py @@ -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