From 2d68dc776d80cc5b71c609b8ddaf2069c97193e7 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 7 May 2020 15:43:51 -0400 Subject: Fix parsing of --network for `podman pod create` Interpreting CNI networks was a bit broken, and it was causing rootless `podman pod create` to fail. Also, we were missing the `--net` alias for `--network`, so add that. Fixes #6119 Signed-off-by: Matthew Heon --- pkg/specgen/pod_validate.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'pkg/specgen/pod_validate.go') diff --git a/pkg/specgen/pod_validate.go b/pkg/specgen/pod_validate.go index 98d59549e..08f1c0300 100644 --- a/pkg/specgen/pod_validate.go +++ b/pkg/specgen/pod_validate.go @@ -33,7 +33,7 @@ func (p *PodSpecGenerator) Validate() error { } // PodNetworkConfig - if err := p.NetNS.validate(); err != nil { + if err := validateNetNS(&p.NetNS); err != nil { return err } if p.NoInfra { @@ -85,10 +85,6 @@ func (p *PodSpecGenerator) Validate() error { return exclusivePodOptions("NoManageHosts", "HostAdd") } - if err := p.NetNS.validate(); err != nil { - return err - } - // Set Defaults if p.NetNS.Value == "" { if rootless.IsRootless() { -- cgit v1.2.3-54-g00ecf