From a2ad8fef136b31989bfcd2f40003f6113aebaf1d Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Mon, 1 Oct 2018 10:29:45 -0700 Subject: Make multi-container the default mode for runsc And remove multicontainer option. PiperOrigin-RevId: 215236981 Change-Id: I9fd1d963d987e421e63d5817f91a25c819ced6cb --- runsc/boot/config.go | 5 ----- runsc/boot/fs.go | 16 ++++++++-------- runsc/boot/loader.go | 2 -- 3 files changed, 8 insertions(+), 15 deletions(-) (limited to 'runsc/boot') diff --git a/runsc/boot/config.go b/runsc/boot/config.go index 01da535af..cd977c8a5 100644 --- a/runsc/boot/config.go +++ b/runsc/boot/config.go @@ -193,10 +193,6 @@ type Config struct { // disabled. Pardon the double negation, but default to enabled is important. DisableSeccomp bool - // MultiContainer enables multiple containers support inside one sandbox. - // TODO: Remove this when multiple container is fully supported. - MultiContainer bool - // SpecFile is the file containing the OCI spec. SpecFile string @@ -224,7 +220,6 @@ func (c *Config) ToFlags() []string { "--debug-log-dir=" + c.DebugLogDir, "--file-access=" + c.FileAccess.String(), "--overlay=" + strconv.FormatBool(c.Overlay), - "--multi-container=" + strconv.FormatBool(c.MultiContainer), "--network=" + c.Network.String(), "--log-packets=" + strconv.FormatBool(c.LogPackets), "--platform=" + c.Platform.String(), diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go index 9e8fea7e1..42e011beb 100644 --- a/runsc/boot/fs.go +++ b/runsc/boot/fs.go @@ -85,14 +85,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, goferFDs []int) (*fs.MountNamespace, error) { mounts := compileMounts(spec) - 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, - }) - } + + // 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: goferFDs} rootInode, err := createRootMount(rootCtx, spec, conf, fds, mounts) if err != nil { diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index 1e2a12280..9fa9b51a0 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -579,8 +579,6 @@ func (l *Loader) executeAsync(args *control.ExecArgs) (kernel.ThreadID, error) { return tgid, nil } -// TODO: Per-container namespaces must be supported for -pid. - // waitContainer waits for the root process of a container to exit. func (l *Loader) waitContainer(cid string, waitStatus *uint32) error { // Don't defer unlock, as doing so would make it impossible for -- cgit v1.2.3