]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/vstart_runner: don't pass sudo for ceph-fuse command
authorRishabh Dave <ridave@redhat.com>
Tue, 9 Aug 2022 08:54:37 +0000 (14:24 +0530)
committerRishabh Dave <ridave@redhat.com>
Mon, 4 Sep 2023 17:08:29 +0000 (22:38 +0530)
Since we pass option "--client_die_on_failed_dentry_invalidate=false"
to ceph-fuse commands issued by vstart_runner.py, passing "sudo" in
ceph-fuse command arguments is unnecessary.

This removes the error message (see below) from vstart_runner.py output
that informs the users that "sudo" was removed from command arguments.
This message is redundant and even misleading as the option above
is passed to ceph-fuse command.

This will have no functional changes on ceph-fuse mount command issued
by vstart_runner.py since FuseMount._run_mount_cmd() did not pass
"omit_sudo=False" (and since default value for omit_sudo in method
LocalRemote.run() of vstart_runner.py is true, vstart_runner.py removes
"sudo" from ceph-fuse command arguments of before execution).

The error message -

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 ./bin/ceph-fuse /tmp/tmp8o4s_6md/mnt.0 --id 0 --client_mountpoint=/ --client_die_on_failed_dentry_invalidate=false

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

index 5ad608cebcf0e4bb7685e3ff0ec0504017f6e3ab..caf7a7fe3f799c4581f08b17eb7d50032cc8e993 100644 (file)
@@ -734,6 +734,11 @@ class LocalFuseMount(LocalCephFSMount, FuseMount):
 
         if os.getuid() != 0:
             mount_cmd += ['--client_die_on_failed_dentry_invalidate=false']
+            # XXX: Passing ceph-fuse option above makes using sudo command
+            # redunant. Plus, we prefer that vstart_runner.py doesn't use sudo
+            # command as far as possbile.
+            mount_cmd.remove('sudo')
+
         return mount_cmd
 
     @property