]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa: use null mode to prevent undesired changes to mountpoint
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 5 Oct 2020 17:40:42 +0000 (10:40 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 13 Oct 2020 17:16:40 +0000 (10:16 -0700)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/fuse_mount.py

index e53ba680b94419704e463934ae8361bc08c35f4b..0e872fbad95f34d60fb5a6d616e41df08caea1c8 100644 (file)
@@ -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