diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-10-01 10:29:45 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-10-01 10:31:17 -0700 |
commit | a2ad8fef136b31989bfcd2f40003f6113aebaf1d (patch) | |
tree | 687966350701e0dc96440699cd32c79266e6bb75 /runsc/sandbox | |
parent | 43e6aff50e23763d12c71b054f100fd91da46736 (diff) |
Make multi-container the default mode for runsc
And remove multicontainer option.
PiperOrigin-RevId: 215236981
Change-Id: I9fd1d963d987e421e63d5817f91a25c819ced6cb
Diffstat (limited to 'runsc/sandbox')
-rw-r--r-- | runsc/sandbox/network.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/runsc/sandbox/network.go b/runsc/sandbox/network.go index 60cbbfcdb..86a52c6ae 100644 --- a/runsc/sandbox/network.go +++ b/runsc/sandbox/network.go @@ -57,35 +57,6 @@ const ( func setupNetwork(conn *urpc.Client, pid int, spec *specs.Spec, conf *boot.Config) error { log.Infof("Setting up network") - if !conf.MultiContainer { - // HACK! - // - // When kubernetes starts a pod, it first creates a sandbox with an - // application that just pauses forever. Later, when a container is - // added to the pod, kubernetes will create another sandbox with a - // config that corresponds to the containerized application, and add it - // to the same namespaces as the pause sandbox. - // - // Running a second sandbox currently breaks because the two sandboxes - // have the same network namespace and configuration, and try to create - // a tap device on the same host device which fails. - // - // Runsc will eventually need to detect that this container is meant to - // be run in the same sandbox as the pausing application, and somehow - // make that happen. - // - // For now the following HACK disables networking for the "pause" - // sandbox, allowing the second sandbox to start up successfully. - // - // TODO: Remove this once multiple containers per sandbox - // is properly supported. - if spec.Annotations[crioContainerTypeAnnotation] == "sandbox" || - spec.Annotations[containerdContainerTypeAnnotation] == "sandbox" { - log.Warningf("HACK: Disabling network") - conf.Network = boot.NetworkNone - } - } - switch conf.Network { case boot.NetworkNone: log.Infof("Network is disabled, create loopback interface only") |