From 7d1f6d70f19b0144e31140a7887f5e2cd14d2dd0 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Wed, 10 Aug 2022 15:43:25 +0530 Subject: [PATCH] qa/cephfs: set omit_sudo for cmd mounting FUSE conn dir vstart_runner.py removes sudo from the command arguments when "omit_sudo" is not explicitly set to "False". This leads to 2 error messages in output of vstart_runner.py which are copied at the end of this commit message. Setting "omit_sudo=False" for the execution of command should remove both of these error messages. This also fixes the potential crash of vstart_runner.py when the FUSE connections directory is not mounted on the machine and it requires superuser privileges to mount it. The 2 error messages copied as it is from the log - DEBUG:__main__:"sudo" was omitted from the following cmd args before execution and logging using function overriding; check vstart_runner.py for more details. DEBUG:__main__:> sudo mount -t fusectl /sys/fs/fuse/connections /sys/fs/fuse/connections mount: /sys/fs/fuse/connections: must be superuser to use mount. Signed-off-by: Rishabh Dave --- qa/tasks/cephfs/fuse_mount.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/tasks/cephfs/fuse_mount.py b/qa/tasks/cephfs/fuse_mount.py index 4e25b861752..9881f8599d4 100644 --- a/qa/tasks/cephfs/fuse_mount.py +++ b/qa/tasks/cephfs/fuse_mount.py @@ -148,7 +148,7 @@ class FuseMount(CephFSMount): if not self.client_remote.is_mounted(conn_dir): self.client_remote.run( args=["sudo", "mount", "-t", "fusectl", conn_dir, conn_dir], - timeout=30) + timeout=30, omit_sudo=False) try: ls_str = self.client_remote.sh("ls " + conn_dir, -- 2.39.5