]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: fix caps_helper.py
authorRishabh Dave <ridave@redhat.com>
Thu, 7 Mar 2024 12:49:21 +0000 (18:19 +0530)
committerRishabh Dave <ridave@redhat.com>
Thu, 11 Apr 2024 17:09:27 +0000 (22:39 +0530)
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 <ridave@redhat.com>
qa/tasks/cephfs/caps_helper.py

index f3bc14b074205e0dbbb7be2fb63e40d57fd32627..a8251f77a6e58a5bbad285fa0b94c9b1073cfb62 100644 (file)
@@ -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]