diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-11-05 15:36:29 +0100 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-11-05 15:44:37 +0100 |
commit | 7f433df7e76716f801c959cad82f4add397d925a (patch) | |
tree | 6ad8cbe1d4a703424d1f9e98e1c7be65cec7840e /cmd/podman/system | |
parent | 58f8c3d743cfe837c9228819436df294fddf408d (diff) | |
download | podman-7f433df7e76716f801c959cad82f4add397d925a.tar.gz podman-7f433df7e76716f801c959cad82f4add397d925a.tar.bz2 podman-7f433df7e76716f801c959cad82f4add397d925a.zip |
rename rootless cni ns to rootless netns
Since we want to use the rootless cni ns also for netavark we should
pick a more generic name. The name is now "rootless network namespace"
or short "rootless netns".
The rename might cause some issues after the update but when the
all containers are restarted or the host is rebooted it should work
correctly.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd/podman/system')
-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 { |