From 62328dfdf7aa834e5086080a7312b45439c2ebdf Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 8 May 2024 21:38:56 -0400 Subject: [PATCH] reef: qa: do not use `fs authorize` for two fs This support was only recently added in squid. Signed-off-by: Patrick Donnelly --- qa/tasks/cephfs/test_admin.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/qa/tasks/cephfs/test_admin.py b/qa/tasks/cephfs/test_admin.py index b5a1da12a8d..fe53baf4e28 100644 --- a/qa/tasks/cephfs/test_admin.py +++ b/qa/tasks/cephfs/test_admin.py @@ -1334,12 +1334,10 @@ class TestFsAuthorize(CephFSTestCase): self.mount_a.umount_wait() - # Authorize client to fs1 - FS_AUTH_CAPS = (('/', 'rw'),) - self.fs1.authorize(self.client_id, FS_AUTH_CAPS) - - FS_AUTH_CAPS = (('/', 'rw', 'root_squash'),) - keyring = self.fs2.authorize(self.client_id, FS_AUTH_CAPS) + self.run_ceph_cmd(f'auth caps client.{self.mount_a.client_id} ' + f'mon "allow r" ' + f'osd "allow rw tag cephfs data={self.fs1.name}, allow rw tag cephfs data={self.fs2.name}" ' + f'mds "allow rwp fsname={self.fs1.name}, allow rw fsname={self.fs2.name} root_squash"') CEPHFS_FEATURE_MDS_AUTH_CAPS_CHECK = 21 # all but CEPHFS_FEATURE_MDS_AUTH_CAPS_CHECK @@ -1348,12 +1346,7 @@ class TestFsAuthorize(CephFSTestCase): # should succeed with self.assert_cluster_log("report clients with broken root_squash", present=False): - keyring_path = self.mount_a.client_remote.mktemp(data=keyring) - self.mount_a.remount(client_id=self.client_id, client_keyring_path=keyring_path, mntargs=mntargs, cephfs_name=self.fs1.name) - - captester = CapTester(self.mount_a, '/') - captester.conduct_pos_test_for_read_caps() - captester.conduct_pos_test_for_open_caps() + self.mount_a.remount(mntargs=mntargs, cephfs_name=self.fs1.name) def test_rootsquash_nofeature(self): """ @@ -1365,7 +1358,6 @@ class TestFsAuthorize(CephFSTestCase): "needed to enforce root_squash MDS caps") self.mount_a.umount_wait() - self.mount_b.umount_wait() FS_AUTH_CAPS = (('/', 'rw', 'root_squash'),) keyring = self.fs.authorize(self.client_id, FS_AUTH_CAPS) @@ -1395,7 +1387,6 @@ class TestFsAuthorize(CephFSTestCase): "needed to enforce root_squash MDS caps") self.mount_a.umount_wait() - self.mount_b.umount_wait() FS_AUTH_CAPS = (('/', 'rw', 'root_squash'),) keyring = self.fs.authorize(self.client_id, FS_AUTH_CAPS) -- 2.39.5