From: Rishabh Dave Date: Thu, 7 Mar 2024 12:49:21 +0000 (+0530) Subject: qa/cephfs: fix caps_helper.py X-Git-Tag: v17.2.8~395^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4954ee11b11e54fe1eb370e10df3abeba83eecfd;p=ceph.git 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 --- diff --git a/qa/tasks/cephfs/caps_helper.py b/qa/tasks/cephfs/caps_helper.py index f3bc14b0742..a8251f77a6e 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]