diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2020-07-29 21:58:46 +0200 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2020-07-31 18:27:49 +0200 |
commit | 949dfc85a0118387aaeffe77f0d9e4be33d93f2e (patch) | |
tree | 669896fe08aace7b5e6b2c0a69ca23dc71d516ab /pkg/specgen/generate | |
parent | 7a15be546adffe4f884abfbd4ed02f69ac7659e0 (diff) | |
download | podman-949dfc85a0118387aaeffe77f0d9e4be33d93f2e.tar.gz podman-949dfc85a0118387aaeffe77f0d9e4be33d93f2e.tar.bz2 podman-949dfc85a0118387aaeffe77f0d9e4be33d93f2e.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/specgen/generate')
-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 b8ab1399e..7adb8be6a 100644 --- a/pkg/specgen/generate/namespaces.go +++ b/pkg/specgen/generate/namespaces.go @@ -462,6 +462,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": |