From 4954ee11b11e54fe1eb370e10df3abeba83eecfd Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Thu, 7 Mar 2024 18:19:21 +0530 Subject: [PATCH] qa/cephfs: fix caps_helper.py Replace calls to run_cluster_cmd() by calls to run_ceph_cmd(). Ideally, a backport should have fixed this issue but the method under inspection here, "get_mon_cap_from_keyring()", has gone through lots of changes, compared to the main branch, along with rest of caps_helper.py. To avoid backporting large amount of QA changes, writing a specific fix will be easier and faster. This will also help with rest of Quincy backports since this patch series/PR makes an important change to QA code. Signed-off-by: Rishabh Dave --- qa/tasks/cephfs/caps_helper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/tasks/cephfs/caps_helper.py b/qa/tasks/cephfs/caps_helper.py index f3bc14b074205..a8251f77a6e58 100644 --- a/qa/tasks/cephfs/caps_helper.py +++ b/qa/tasks/cephfs/caps_helper.py @@ -10,8 +10,8 @@ class CapsHelper(CephFSTestCase): def run_mon_cap_tests(self, moncap, keyring): keyring_path = self.fs.admin_remote.mktemp(data=keyring) - fsls = self.run_cluster_cmd(f'fs ls --id {self.client_id} -k ' - f'{keyring_path}') + fsls = self.get_ceph_cmd_stdout(f'fs ls --id {self.client_id} -k ' + f'{keyring_path}') # we need to check only for default FS when fsname clause is absent # in MON/MDS caps @@ -70,7 +70,7 @@ class CapsHelper(CephFSTestCase): errmsg='permission denied') def get_mon_cap_from_keyring(self, client_name): - keyring = self.run_cluster_cmd(cmd=f'auth get {client_name}') + keyring = self.get_ceph_cmd_stdout(f'auth get {client_name}') for line in keyring.split('\n'): if 'caps mon' in line: return line[line.find(' = "') + 4 : -1] -- 2.39.5