From aad0cfcb4963221d04dbcc375bd7a85bb9b8907d Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Mon, 6 Jul 2020 23:11:27 +0530 Subject: [PATCH] qa/cephfs: set omit_sudo to False for wait_until_mounted() in... fuse_mount.py. This isn't critical at all to vstart_runner.py runs but this patch must dramatically reduce the time it takes in case the command fails with "permission denied" due to lack of superuser privileges since in this case the command is re-run 9 more times, each separated by a sleep for 5 seconds. Signed-off-by: Rishabh Dave --- qa/tasks/cephfs/fuse_mount.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qa/tasks/cephfs/fuse_mount.py b/qa/tasks/cephfs/fuse_mount.py index 70fcaacdef6..5fc6d8ae67b 100644 --- a/qa/tasks/cephfs/fuse_mount.py +++ b/qa/tasks/cephfs/fuse_mount.py @@ -241,13 +241,15 @@ class FuseMount(CephFSMount): self.mounted = True - # Now that we're mounted, set permissions so that the rest of the test will have - # unrestricted access to the filesystem mount. + # Now that we're mounted, set permissions so that the rest of the test + # will have unrestricted access to the filesystem mount. for retry in range(10): try: stderr = StringIO() - self.client_remote.run(args=['sudo', 'chmod', '1777', self.mountpoint], - timeout=(15*60), cwd=self.test_dir, stderr=stderr) + self.client_remote.run(args=['sudo', 'chmod', '1777', + self.mountpoint], + timeout=(15*60), cwd=self.test_dir, + stderr=stderr, omit_sudo=False) break except run.CommandFailedError: stderr = stderr.getvalue() -- 2.39.5