From: Patrick Donnelly Date: Thu, 9 May 2024 01:38:56 +0000 (-0400) Subject: reef: qa: do not use `fs authorize` for two fs X-Git-Tag: v18.2.5~668^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=62328dfdf7aa834e5086080a7312b45439c2ebdf;p=ceph.git reef: qa: do not use `fs authorize` for two fs This support was only recently added in squid. Signed-off-by: Patrick Donnelly --- diff --git a/qa/tasks/cephfs/test_admin.py b/qa/tasks/cephfs/test_admin.py index b5a1da12a8da..fe53baf4e284 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)