From c4b2ccd9d68ce408d5e4603d281b061b16fd7e09 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Tue, 9 Aug 2022 14:39:18 +0530 Subject: [PATCH] qa/cephfs: check before mounting fuse connections directory 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 --- qa/tasks/cephfs/fuse_mount.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qa/tasks/cephfs/fuse_mount.py b/qa/tasks/cephfs/fuse_mount.py index 106c6648d4a..4e25b861752 100644 --- a/qa/tasks/cephfs/fuse_mount.py +++ b/qa/tasks/cephfs/fuse_mount.py @@ -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, -- 2.39.5