1
0
mirror of https://github.com/containers/podman.git synced 2026-02-05 06:45:31 +01:00

Remove CNI backend from CLI options and completions

Remove user-facing CLI options for CNI network backend:

CLI flags:
- Keep --network-backend global flag as hidden and deprecated for
  backward compatibility with cleanup commands from 5.x containers
- Map flag to a throwaway variable (value is ignored)
- Remove shell completion for network backend values

Shell completions:
- Remove AutocompleteNetworkBackend() function
- Remove references to CNI and Netavark type constants

Backward compatibility:
- Remove --rootless-cni flag alias for podman unshare
- Remove SetNormalizeFunc that mapped rootless-cni to rootless-netns
- Update --rootless-netns flag description to mention only netavark

The --network-backend flag remains as a hidden deprecated flag to
prevent failures when upgrading from 5.x where containers may have
cleanup commands that include this flag. The flag is accepted but
ignored. Users can no longer specify CNI as a network backend option.
The --rootless-cni alias is removed; users must use --rootless-netns.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar
2025-12-25 14:06:58 -05:00
parent 83ffeb1b26
commit 73ef7cfcdc
6 changed files with 9 additions and 23 deletions

View File

@@ -281,7 +281,6 @@ func CreateExitCommandArgs(storageConfig storageTypes.StoreOptions, config *conf
"--cgroup-manager", config.Engine.CgroupManager,
"--tmpdir", config.Engine.TmpDir,
"--network-config-dir", config.Network.NetworkConfigDir,
"--network-backend", config.Network.NetworkBackend,
"--volumepath", config.Engine.VolumePath,
fmt.Sprintf("--transient-store=%t", storageConfig.TransientStore),
}