diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-11-05 18:59:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-05 18:59:55 +0100 |
commit | e826158b4b9c4baef41ca872dea5e68e089355d3 (patch) | |
tree | 3fff45f85073bfda41adccf6e45a0ffd5fc44b91 /cmd/podman | |
parent | 9b3b44903d4d494186bd767d2ea5f3b2c753a7f2 (diff) | |
parent | 7f433df7e76716f801c959cad82f4add397d925a (diff) | |
download | podman-e826158b4b9c4baef41ca872dea5e68e089355d3.tar.gz podman-e826158b4b9c4baef41ca872dea5e68e089355d3.tar.bz2 podman-e826158b4b9c4baef41ca872dea5e68e089355d3.zip |
Merge pull request #12183 from Luap99/rootless-netns-cleanup
Fix rootless cni netns cleanup logic and rename to rootless netns
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/system/unshare.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/podman/system/unshare.go b/cmd/podman/system/unshare.go index 50230609e..9b777dd8f 100644 --- a/cmd/podman/system/unshare.go +++ b/cmd/podman/system/unshare.go @@ -10,6 +10,7 @@ import ( "github.com/containers/podman/v3/pkg/rootless" "github.com/pkg/errors" "github.com/spf13/cobra" + "github.com/spf13/pflag" ) var ( @@ -34,7 +35,14 @@ func init() { }) flags := unshareCommand.Flags() flags.SetInterspersed(false) - flags.BoolVar(&unshareOptions.RootlessCNI, "rootless-cni", false, "Join the rootless network namespace used for CNI networking") + flags.BoolVar(&unshareOptions.RootlessNetNS, "rootless-netns", false, "Join the rootless network namespace used for CNI and netavark networking") + // backwards compat still allow --rootless-cni + flags.SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName { + if name == "rootless-cni" { + name = "rootless-netns" + } + return pflag.NormalizedName(name) + }) } func unshare(cmd *cobra.Command, args []string) error { |