]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: set omit_sudo for cmd mounting FUSE conn dir 47533/head
authorRishabh Dave <ridave@redhat.com>
Wed, 10 Aug 2022 10:13:25 +0000 (15:43 +0530)
committerRishabh Dave <ridave@redhat.com>
Tue, 12 Sep 2023 07:56:00 +0000 (13:26 +0530)
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>
qa/tasks/cephfs/fuse_mount.py

index 4e25b861752ac1be8efca20eaa7994f303f2e631..9881f8599d47559e56b01f21c4ab0e96f37c2592 100644 (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,