summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-10-01 10:29:45 -0700
committerShentubot <shentubot@google.com>2018-10-01 10:31:17 -0700
commita2ad8fef136b31989bfcd2f40003f6113aebaf1d (patch)
tree687966350701e0dc96440699cd32c79266e6bb75 /runsc/boot
parent43e6aff50e23763d12c71b054f100fd91da46736 (diff)
Make multi-container the default mode for runsc
And remove multicontainer option. PiperOrigin-RevId: 215236981 Change-Id: I9fd1d963d987e421e63d5817f91a25c819ced6cb
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/config.go5
-rw-r--r--runsc/boot/fs.go16
-rw-r--r--runsc/boot/loader.go2
3 files changed, 8 insertions, 15 deletions
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