summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-08-23 09:40:09 -0400
committerGitHub <noreply@github.com>2021-08-23 09:40:09 -0400
commitd36510702be1d60b8984ebcf3ad20a70f398c568 (patch)
tree013deaf08fbdfe3c64ebc5678790cb577f43d4f6 /cmd/podman
parent34a6dfb30ea1861be2f261e88df2979562ad6b60 (diff)
parentfeff0d3c4bf67b16f2b31346a77f6dffc2416d4a (diff)
downloadpodman-d36510702be1d60b8984ebcf3ad20a70f398c568.tar.gz
podman-d36510702be1d60b8984ebcf3ad20a70f398c568.tar.bz2
podman-d36510702be1d60b8984ebcf3ad20a70f398c568.zip
Merge pull request #11305 from Luap99/fix-11303
Use pod netns with --pod-id-file
Diffstat (limited to 'cmd/podman')
-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
}