From 2432871a1ba41223c52bf59fd12f1b8f53c03bda Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Mon, 5 Oct 2020 10:40:42 -0700 Subject: [PATCH] qa: use null mode to prevent undesired changes to mountpoint Signed-off-by: Patrick Donnelly --- qa/tasks/cephfs/fuse_mount.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qa/tasks/cephfs/fuse_mount.py b/qa/tasks/cephfs/fuse_mount.py index e53ba680b94..0e872fbad95 100644 --- a/qa/tasks/cephfs/fuse_mount.py +++ b/qa/tasks/cephfs/fuse_mount.py @@ -63,11 +63,13 @@ class FuseMount(CephFSMount): self.client_config.get('valgrind') is not None: daemon_signal = 'term' + # Use 0000 mode to prevent undesired modifications to the mountpoint on + # the local file system. + script = f'mkdir -m 0000 -p -v {self.hostfs_mntpt}'.split() stderr = StringIO() try: - self.client_remote.run(args=['mkdir', '-p', self.hostfs_mntpt], - timeout=(15*60), cwd=self.test_dir, - stderr=StringIO()) + self.client_remote.run(args=script, timeout=(15*60), + cwd=self.test_dir, stderr=StringIO()) except CommandFailedError: if 'file exists' not in stderr.getvalue().lower(): raise -- 2.39.5