Skip to content

Commit

Permalink
reef: qa: do not use fs authorize for two fs
Browse files Browse the repository at this point in the history
This support was only recently added in squid.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
  • Loading branch information
batrick committed May 10, 2024
1 parent 6a6aca8 commit 62328df
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions qa/tasks/cephfs/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,12 +1334,10 @@ def test_multifs_rootsquash_nofeature(self):

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
Expand All @@ -1348,12 +1346,7 @@ def test_multifs_rootsquash_nofeature(self):

# 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):
"""
Expand All @@ -1365,7 +1358,6 @@ def test_rootsquash_nofeature(self):
"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)
Expand Down Expand Up @@ -1395,7 +1387,6 @@ def test_rootsquash_nofeature_evict(self):
"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)
Expand Down

0 comments on commit 62328df

Please sign in to comment.