summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2018-09-19 16:09:50 -0700
committerShentubot <shentubot@google.com>2018-09-19 16:10:47 -0700
commit2ad3228cd0f226804cfc7ae3ae7fff561caa2eda (patch)
tree67ad38f5d88b779ba4d3d95a91a430f3261e0bc6 /runsc/boot
parent2e497de2d9f6c410a214faae9962e762757b0648 (diff)
runsc: Don't create __runsc_containers__ unless we are in multi-container mode.
PiperOrigin-RevId: 213715511 Change-Id: I3e41b583c6138edbdeba036dfb9df4864134fc12
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/fs.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go
index 5ec9a7d03..420e57022 100644
--- a/runsc/boot/fs.go
+++ b/runsc/boot/fs.go
@@ -84,12 +84,14 @@ func (f *fdDispenser) empty() bool {
// and all mounts. 'rootCtx' is used to walk directories to find mount points.
func createMountNamespace(userCtx context.Context, rootCtx context.Context, spec *specs.Spec, conf *Config, ioFDs []int) (*fs.MountNamespace, error) {
mounts := compileMounts(spec)
- // Create a tmpfs mount where we create and mount a root filesystem for
- // each child container.
- mounts = append(mounts, specs.Mount{
- Type: tmpfs,
- Destination: childContainersDir,
- })
+ if conf.MultiContainer {
+ // Create a tmpfs mount where we create and mount a root filesystem for
+ // each child container.
+ mounts = append(mounts, specs.Mount{
+ Type: tmpfs,
+ Destination: childContainersDir,
+ })
+ }
fds := &fdDispenser{fds: ioFDs}
rootInode, err := createRootMount(rootCtx, spec, conf, fds, mounts)
if err != nil {