From: Kotresh HR Date: Thu, 26 Jun 2025 07:44:00 +0000 (+0000) Subject: qa: Fix validation of client_version X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f10e34d0350d216f02d4e73ec695340daae11dd4;p=ceph.git qa: Fix validation of client_version The multifs auth caps bug has a fix both in client and mds. If it's old client and not patched, we expect that the fs with 'rw' would end up having 'r' caps with the multifs auth caps used as in the test 'test_multifs_single_client_cross_access_r_caps_end'. This patch adds the conditional to validate the same. This commit makes use of the PR #64005 Fixes: https://tracker.ceph.com/issues/72167 Signed-off-by: Kotresh HR --- diff --git a/qa/tasks/cephfs/test_admin.py b/qa/tasks/cephfs/test_admin.py index 5f2488cbff08..007e1f4e0e6d 100644 --- a/qa/tasks/cephfs/test_admin.py +++ b/qa/tasks/cephfs/test_admin.py @@ -1812,16 +1812,30 @@ class TestFsAuthorize(CephFSTestCase): keyring_path = self.mount_b.client_remote.mktemp(data=keyring) self.mount_b.remount(client_id=self.client_id, client_keyring_path=keyring_path, cephfs_name=self.fs2.name) - # Client on fs1 - validate 'rw' access - captester_fs1_rw.conduct_pos_test_for_read_caps() - captester_fs1_rw.conduct_pos_test_for_write_caps() - captester_fs1_rw.conduct_pos_test_for_new_file_creation() - # Client on fs2 should not have 'rw' access captester_fs2_r.conduct_pos_test_for_read_caps() captester_fs2_r.conduct_neg_test_for_write_caps() captester_fs2_r.conduct_neg_test_for_new_file_creation() + # Client on fs1 - validate 'rw' access + ceph_client_version = None + tasks = self.ctx.config.get('tasks', []) + for task in tasks: + if task.get("install", None): + ceph_client_version = task.get("install").get("tag", None) + break + + log.info(f"dumping ceph_client_version - {ceph_client_version}") + captester_fs1_rw.conduct_pos_test_for_read_caps() + # The multifs auth caps bug has a fix both in client and mds + # If it's old client (19.2.2) and not patched, we expect that the fs + # with 'rw' would end up having 'r' caps with the multifs for + # auth caps used as in this test above. + if ceph_client_version != "v19.2.2": + captester_fs1_rw.conduct_pos_test_for_write_caps() + captester_fs1_rw.conduct_pos_test_for_new_file_creation() + + def test_multifs_rootsquash_nofeature(self): """ That having root_squash on one fs doesn't prevent access to others.