summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-08-23 11:00:55 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-08-23 11:14:41 +0200
commitfeff0d3c4bf67b16f2b31346a77f6dffc2416d4a (patch)
treefdc0ed908eef7540d9022d4f7af360b4005be16f /cmd
parent2de56a5f41473e8f759972ec568089e9cddc0f98 (diff)
downloadpodman-feff0d3c4bf67b16f2b31346a77f6dffc2416d4a.tar.gz
podman-feff0d3c4bf67b16f2b31346a77f6dffc2416d4a.tar.bz2
podman-feff0d3c4bf67b16f2b31346a77f6dffc2416d4a.zip
Use pod netns with --pod-id-file
When `--pod-id-file` is used do not parse the default network namespace and let specgen handle it instead. This regression was introduced in commit 7ef3981abe24. Fixes #11303 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/containers/create.go2
-rw-r--r--cmd/podman/containers/run.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go
index a57488af2..d16fa0865 100644
--- a/cmd/podman/containers/create.go
+++ b/cmd/podman/containers/create.go
@@ -96,7 +96,7 @@ func create(cmd *cobra.Command, args []string) error {
var (
err error
)
- cliVals.Net, err = common.NetFlagsToNetOptions(cmd, cliVals.Pod == "")
+ cliVals.Net, err = common.NetFlagsToNetOptions(cmd, cliVals.Pod == "" && cliVals.PodIDFile == "")
if err != nil {
return err
}
diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go
index 579af4eb1..830d1de7f 100644
--- a/cmd/podman/containers/run.go
+++ b/cmd/podman/containers/run.go
@@ -106,7 +106,7 @@ func init() {
func run(cmd *cobra.Command, args []string) error {
var err error
- cliVals.Net, err = common.NetFlagsToNetOptions(cmd, cliVals.Pod == "")
+ cliVals.Net, err = common.NetFlagsToNetOptions(cmd, cliVals.Pod == "" && cliVals.PodIDFile == "")
if err != nil {
return err
}