diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-10 14:00:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 14:00:49 -0400 |
commit | 2f0e803e7605570cd073ddffc8110a6b9d466a17 (patch) | |
tree | a08b56eea43da3fa92f0cb88b48606a9f7f014b4 /libpod/container_validate.go | |
parent | 8d78605929fc7251e31aee35fcc166afe03a2a80 (diff) | |
parent | f82abc774a70419bc7a2ff444a323110e1d9d938 (diff) | |
download | podman-2f0e803e7605570cd073ddffc8110a6b9d466a17.tar.gz podman-2f0e803e7605570cd073ddffc8110a6b9d466a17.tar.bz2 podman-2f0e803e7605570cd073ddffc8110a6b9d466a17.zip |
Merge pull request #7460 from AkihiroSuda/allow-rootless-cni
rootless: support `podman network create` (CNI-in-slirp4netns)
Diffstat (limited to 'libpod/container_validate.go')
-rw-r--r-- | libpod/container_validate.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/libpod/container_validate.go b/libpod/container_validate.go index d657e3549..b78168cd1 100644 --- a/libpod/container_validate.go +++ b/libpod/container_validate.go @@ -2,7 +2,6 @@ package libpod import ( "github.com/containers/podman/v2/libpod/define" - "github.com/containers/podman/v2/pkg/rootless" spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) @@ -68,16 +67,6 @@ func (c *Container) validate() error { } } - // Rootless has some requirements, compared to networks. - if rootless.IsRootless() { - if len(c.config.Networks) > 0 { - return errors.Wrapf(define.ErrInvalidArg, "cannot join CNI networks if running rootless") - } - - // TODO: Should we make sure network mode is set to Slirp if set - // at all? - } - // Can only set static IP or MAC is creating a network namespace. if !c.config.CreateNetNS && (c.config.StaticIP != nil || c.config.StaticMAC != nil) { return errors.Wrapf(define.ErrInvalidArg, "cannot set static IP or MAC address if not creating a network namespace") |