]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: avoid explicit set to client mountpoint as "/" 51047/head
authorVenky Shankar <vshankar@redhat.com>
Mon, 30 Jan 2023 14:16:35 +0000 (19:46 +0530)
committerMilind Changire <mchangir@redhat.com>
Wed, 12 Apr 2023 11:57:26 +0000 (17:27 +0530)
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: bf83eaa4e75516a6937e4097b8708c48856a9473
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 4322dcc2e94bab80042eaf1e236174f6e6772cec)

qa/tasks/cephfs/fuse_mount.py
qa/tasks/cephfs/kernel_mount.py
qa/tasks/cephfs/mount.py

index 731e9f66ac93ad1a4cc74731e40198dc38b30649..0b9b17403863fd96e26a8777d2c3dbbd6a50f057 100644 (file)
@@ -114,8 +114,8 @@ class FuseMount(CephFSMount):
 
         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]
index 0f0a7cdf7fe554914cf097f1d256e0a2211f1aa8..750b6b5335a4b7eafd8cf037496646a72ba6106d 100644 (file)
@@ -49,6 +49,8 @@ class KernelMount(CephFSMount):
 
         self.setup_netns()
 
+        if not self.cephfs_mntpt:
+            self.cephfs_mntpt = '/'
         if not self.cephfs_name:
             self.cephfs_name = 'cephfs'
 
index e9341141f63aaa658fd534d2cdfccaa8992e7f19..0c3635f3686a65be505c2dd98d9e14edefcc4793 100644 (file)
@@ -1503,6 +1503,3 @@ class CephFSMount(object):
             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 = "/"