diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2020-07-29 21:58:46 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-08-11 13:53:23 +0200 |
commit | 895e0d0e2ea74cbba4a4a351e865c55f313bdf99 (patch) | |
tree | 3ae3e2bd0034d0fb7e33374fd1ba8ce9747732b4 /pkg | |
parent | 3262f77406c597652e5cdbf6585a0c4f3bb30436 (diff) | |
download | podman-895e0d0e2ea74cbba4a4a351e865c55f313bdf99.tar.gz podman-895e0d0e2ea74cbba4a4a351e865c55f313bdf99.tar.bz2 podman-895e0d0e2ea74cbba4a4a351e865c55f313bdf99.zip |
fix pod creation with "new:" syntax
When you execute podman create/run with the --pod new:<name> syntax
the pod was created but the namespaces where not shared and
therefore containers could not communicate over localhost.
Add the default namespaces and pass the network options to the
pod create options.
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/specgen/generate/namespaces.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/specgen/generate/namespaces.go b/pkg/specgen/generate/namespaces.go index 566830cd8..39a45398d 100644 --- a/pkg/specgen/generate/namespaces.go +++ b/pkg/specgen/generate/namespaces.go @@ -452,6 +452,10 @@ func specConfigureNamespaces(s *specgen.SpecGenerator, g *generate.Generator, rt func GetNamespaceOptions(ns []string) ([]libpod.PodCreateOption, error) { var options []libpod.PodCreateOption var erroredOptions []libpod.PodCreateOption + if ns == nil { + //set the default namespaces + ns = strings.Split(specgen.DefaultKernelNamespaces, ",") + } for _, toShare := range ns { switch toShare { case "cgroup": |