diff --git a/docs/source/AdministratorGuide/Resources/storage.rst b/docs/source/AdministratorGuide/Resources/storage.rst index 5e352402a8d..42eb92e4c96 100644 --- a/docs/source/AdministratorGuide/Resources/storage.rst +++ b/docs/source/AdministratorGuide/Resources/storage.rst @@ -282,6 +282,7 @@ If the local path follows the DIRAC convention (i.e. finishes with the LFN), the { Protocol = file Path = /mnt/lustre_3/storm_3/lhcbdisk/ + MountOptions = rw # ro by default Host = localhost Access = local } diff --git a/src/DIRAC/Resources/Computing/SingularityComputingElement.py b/src/DIRAC/Resources/Computing/SingularityComputingElement.py index 8f37fe25e68..12c66badca5 100644 --- a/src/DIRAC/Resources/Computing/SingularityComputingElement.py +++ b/src/DIRAC/Resources/Computing/SingularityComputingElement.py @@ -387,7 +387,12 @@ def submitJob(self, executableFile, proxy=None, **kwargs): continue mountedPath = se.getStorageParameters(protocol="file")["Value"]["Path"] - bindPaths.append(f"{mountedPath}:{mountedPath}:ro") + mountOptions = se.getStorageParameters(protocol="file")["Value"].get("MountOptions", "ro") + if mountOptions not in ("rw", "ro"): + self.log.warn(f"Unknown mount mode: {mountOptions}") + continue + + bindPaths.append(f"{mountedPath}:{mountedPath}:{mountOptions}") except KeyError: pass