Skip to content

Commit becfb26

Browse files
Merge pull request ceph#54778 from lxbsz/wip-63141
qa/cephfs: fix root_squash check failure bug Reviewed-by: Dhairya Parmar <[email protected]> Reviewed-by: Rishabh Dave <[email protected]>
2 parents fa256fa + 920eceb commit becfb26

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

qa/tasks/cephfs/caps_helper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,16 @@ def gen_mds_cap_str(caps):
6666
6767
caps = ((perm1, fsname1, cephfs_mntpt1), (perm2, fsname2, cephfs_mntpt2))
6868
"""
69-
def _gen_mds_cap_str(perm, fsname=None, cephfs_mntpt='/'):
69+
def _gen_mds_cap_str(perm, fsname=None, cephfs_mntpt='/', root_squash=False):
7070
mds_cap = f'allow {perm}'
7171
if fsname:
7272
mds_cap += f' fsname={fsname}'
7373
if cephfs_mntpt != '/':
7474
if cephfs_mntpt[0] == '/':
7575
cephfs_mntpt = cephfs_mntpt[1:]
7676
mds_cap += f' path={cephfs_mntpt}'
77+
if root_squash:
78+
mds_cap += ' root_squash'
7779
return mds_cap
7880

7981
if len(caps) == 1:

qa/tasks/cephfs/test_admin.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,11 +1730,9 @@ def test_idem_unaffected_root_squash(self):
17301730
keyring = self.fs.mon_manager.get_keyring(self.client_id)
17311731
moncap = gen_mon_cap_str((('r', self.fs.name,),))
17321732
osdcap = gen_osd_cap_str(((PERM, self.fs.name),))
1733-
mdscap = gen_mds_cap_str(((PERM, self.fs.name, PATH),))
1733+
mdscap = gen_mds_cap_str(((PERM, self.fs.name, PATH, True),))
17341734
for cap in (moncap, osdcap, mdscap):
17351735
self.assertIn(cap, keyring)
1736-
self._remount(self.mount_a, self.fs.name, keyring, PATH)
1737-
self.captester.run_cap_tests(self.fs, self.client_id, PERM, PATH)
17381736

17391737
def _get_uid(self):
17401738
return self.mount_a.client_remote.run(

0 commit comments

Comments
 (0)