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 <ridave@redhat.com>
This commit is contained in:
Rishabh Dave 2020-07-06 23:11:27 +05:30
parent 749da74e2d
commit aad0cfcb49

View File

@ -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()