diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-10-30 15:50:27 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-10-30 15:50:27 +0000 |
commit | 242e16e592da6ef0bb3b8f36ba5ce3eb01c0c1ba (patch) | |
tree | 254098f8d4597e206cf674172caffd6c7f510424 /morphlib/extensions.py | |
parent | f786b2f6f4b4db8c3410c4e8991c36df8d752a27 (diff) | |
parent | 53ce07c7062fc5bad7fa4c470b1824393474277d (diff) | |
download | morph-242e16e592da6ef0bb3b8f36ba5ce3eb01c0c1ba.tar.gz |
Merge branch 'baserock/richardmaw-os/unify-namespace-logic'
This removes the last case of global mounting that could cause issues
for being able to run multiple builds in parallel.
There's still concurrent access to caches and git servers that could
cause issues, but with this, it's possible to run morph in the
test-suite in parallel.
Reviewed-by: Daniel Silverstone
Reviewed-by: Sam Thursfield
Diffstat (limited to 'morphlib/extensions.py')
-rw-r--r-- | morphlib/extensions.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/morphlib/extensions.py b/morphlib/extensions.py index 6b81e116..b270d304 100644 --- a/morphlib/extensions.py +++ b/morphlib/extensions.py @@ -223,10 +223,7 @@ class ExtensionSubprocess(object): def close_read_end(): os.close(log_read_fd) p = subprocess.Popen( - # We unshare and mount --make-rprivate so mounts done by write - # extensions can't interfere with the rest of the system. - ['unshare', '-m', '--', '/bin/sh', '-c', - 'mount --make-rprivate / && exec "$@"', '-', filename] + args, + morphlib.util.unshared_cmdline([filename] + list(args)), cwd=cwd, env=new_env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, preexec_fn=close_read_end) |