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 <ridave@redhat.com>
This commit is contained in:
Rishabh Dave 2022-08-10 15:43:25 +05:30
parent c4b2ccd9d6
commit 7d1f6d70f1

View File

@ -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,