From: Venky Shankar Date: Wed, 15 Nov 2023 15:21:47 +0000 (+0530) Subject: qa: correct usage of DEBUGFS_META_DIR in dedent X-Git-Tag: v17.2.8~186^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=05ca43328afb9ad9710411e79d50978548671d2d;p=ceph.git qa: correct usage of DEBUGFS_META_DIR in dedent Signed-off-by: Venky Shankar (cherry picked from commit 334cdaf28616631ecb9ca1c94a070fcbb7dee729) --- diff --git a/qa/tasks/cephfs/kernel_mount.py b/qa/tasks/cephfs/kernel_mount.py index f20fcc3cda1c..666cc19660e7 100644 --- a/qa/tasks/cephfs/kernel_mount.py +++ b/qa/tasks/cephfs/kernel_mount.py @@ -245,9 +245,10 @@ class KernelMount(CephFSMount): import json def get_id_to_dir(): - result = {} + meta_dir = "{meta_dir}" + result = dict() for dir in glob.glob("/sys/kernel/debug/ceph/*"): - if os.path.basename(dir) == DEBUGFS_META_DIR: + if os.path.basename(dir) == meta_dir: continue mds_sessions_lines = open(os.path.join(dir, "mds_sessions")).readlines() global_id = mds_sessions_lines[0].split()[1].strip('"') @@ -255,7 +256,7 @@ class KernelMount(CephFSMount): result[client_id] = global_id return result print(json.dumps(get_id_to_dir())) - """) + """.format(meta_dir=DEBUGFS_META_DIR)) output = self.client_remote.sh([ 'sudo', 'python3', '-c', pyscript