From 980d8d5db2193f53313c606b593dfb6558d38f6b Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Thu, 26 Jun 2025 07:44:00 +0000 Subject: [PATCH] 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 (cherry picked from commit f10e34d0350d216f02d4e73ec695340daae11dd4) --- qa/tasks/cephfs/test_admin.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/qa/tasks/cephfs/test_admin.py b/qa/tasks/cephfs/test_admin.py index 973eceb9cbf..80693c425d7 100644 --- a/qa/tasks/cephfs/test_admin.py +++ b/qa/tasks/cephfs/test_admin.py @@ -1731,16 +1731,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. -- 2.39.5