]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/cephfs: check before mounting fuse connections directory
authorRishabh Dave <ridave@redhat.com>
Tue, 9 Aug 2022 09:09:18 +0000 (14:39 +0530)
committerRishabh Dave <ridave@redhat.com>
Tue, 12 Sep 2023 07:55:45 +0000 (13:25 +0530)
Check if "/sys/fs/fuse/connections" is already mounted before attempting
to mount it again. Doing so leads to unnecessary error messages in the
vstart_runner.py's output (and most likely in logs for teuthology test
runs too) which confuses the users. See end for the error message.

Also, remove "check_status=False" so that the when the commands crashes
the testing is halted immediately. Initially, this must've been added to
ignore errors generated from re-mounting FUSE connections directory
repeatedly.

The error message -

DEBUG:__main__:> sudo mount -t fusectl /sys/fs/fuse/connections /sys/fs/fuse/connections
mount: /sys/fs/fuse/connections: /sys/fs/fuse/connections already mounted or mount point busy.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/fuse_mount.py

index 106c6648d4a418bdbfd31a913423c00f6cfb5cba..4e25b861752ac1be8efca20eaa7994f303f2e631 100644 (file)
@@ -144,9 +144,11 @@ class FuseMount(CephFSMount):
 
         self.client_remote.run(args=['sudo', 'modprobe', 'fuse'],
                                check_status=False)
-        self.client_remote.run(
-            args=["sudo", "mount", "-t", "fusectl", conn_dir, conn_dir],
-            check_status=False, timeout=(30))
+
+        if not self.client_remote.is_mounted(conn_dir):
+            self.client_remote.run(
+                args=["sudo", "mount", "-t", "fusectl", conn_dir, conn_dir],
+                timeout=30)
 
         try:
             ls_str = self.client_remote.sh("ls " + conn_dir,