Skip to content

Commit

Permalink
qa: avoid explicit set to client mountpoint as "/"
Browse files Browse the repository at this point in the history
This causes self.cephfs_mntpt to set as "/" by default which
overrides the config in ceph.conf. `test_client_cache_size`
updates ceph.conf with:

        client mountpoint = /subdir

However, the ceph-fuse mount command has --client_mountpoint explicitly
set as "/", thereby causing the root of the file system to get mounted which
confuses the test.

Fixes: http://tracker.ceph.com/issues/56446
Introduced-by: bf83eaa
Signed-off-by: Venky Shankar <vshankar@redhat.com>
  • Loading branch information
vshankar committed Jan 30, 2023
1 parent d33a2a9 commit 4322dcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions qa/tasks/cephfs/fuse_mount.py
Expand Up @@ -114,8 +114,8 @@ def _get_mount_cmd(self, mntopts, mntargs):

self.validate_subvol_options()

assert(self.cephfs_mntpt)
mount_cmd += ["--client_mountpoint=" + self.cephfs_mntpt]
if self.cephfs_mntpt:
mount_cmd += ["--client_mountpoint=" + self.cephfs_mntpt]

if self.cephfs_name:
mount_cmd += ["--client_fs=" + self.cephfs_name]
Expand Down
2 changes: 2 additions & 0 deletions qa/tasks/cephfs/kernel_mount.py
Expand Up @@ -49,6 +49,8 @@ def mount(self, mntopts=None, check_status=True, **kwargs):

self.setup_netns()

if not self.cephfs_mntpt:
self.cephfs_mntpt = '/'
if not self.cephfs_name:
self.cephfs_name = 'cephfs'

Expand Down
3 changes: 0 additions & 3 deletions qa/tasks/cephfs/mount.py
Expand Up @@ -1503,6 +1503,3 @@ def validate_subvol_options(self):
subvol_paths = self.ctx.created_subvols[self.cephfs_name]
path_to_mount = subvol_paths[mount_subvol_num]
self.cephfs_mntpt = path_to_mount
elif not self.cephfs_mntpt:
# default to the "/" path
self.cephfs_mntpt = "/"

0 comments on commit 4322dcc

Please sign in to comment.