diff options
author | Matthew Heon <mheon@redhat.com> | 2019-03-28 17:39:56 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2019-03-28 17:39:56 -0400 |
commit | beb263554efdb849291caf5dba4a74966564b78d (patch) | |
tree | cc701d33503fbc012cb03ef417dca916a91fac27 /libpod | |
parent | 9085898ce2d42bf872c137e981202820066736c7 (diff) | |
download | podman-beb263554efdb849291caf5dba4a74966564b78d.tar.gz podman-beb263554efdb849291caf5dba4a74966564b78d.tar.bz2 podman-beb263554efdb849291caf5dba4a74966564b78d.zip |
Ensure that we make a netns for CNI non-default nets
We accidentally patched this out trying to enable ns:/path/to/ns
This should restore the ability to configure nondefault CNI
networks with Podman, by ensuring that they request creation of a
network namespace.
Completely remove the WithNetNS() call when we do use an explicit
namespace from a path. We use that call to indicate that a netns
is going to be created - there should not be any question about
whether it actually does.
Fixes #2795
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/options.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/options.go b/libpod/options.go index e1ffd6ea5..84c541314 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -930,7 +930,7 @@ func WithNetNS(portMappings []ocicni.PortMapping, postConfigureNetNS bool, netmo ctr.config.PostConfigureNetNS = postConfigureNetNS ctr.config.NetMode = namespaces.NetworkMode(netmode) - ctr.config.CreateNetNS = !ctr.config.NetMode.IsUserDefined() + ctr.config.CreateNetNS = true ctr.config.PortMappings = portMappings ctr.config.Networks = networks |