Remove rootless_networking option from containers.conf

This field was only needed for machine to force cni, however you can set
netns="bridge" in the config to have the same effect. This is already
done in the machine setup.

see https://github.com/containers/common/pull/895

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2022-01-20 18:52:36 +01:00
parent 206e57e5b0
commit ee039b7403
2 changed files with 2 additions and 3 deletions

View File

@ -243,7 +243,6 @@ ExecStart=/usr/bin/sleep infinity
`
containers := `[containers]
netns="bridge"
rootless_networking="cni"
`
rootContainers := `[engine]
machine_enabled=true

View File

@ -353,11 +353,11 @@ func ParseNetworkFlag(networks []string) (Namespace, map[string]types.PerNetwork
toReturn.NSMode = FromPod
case ns == "" || ns == string(Default) || ns == string(Private):
// Net defaults to Slirp on rootless
if rootless.IsRootless() && containerConfig.Containers.RootlessNetworking != "cni" {
if rootless.IsRootless() {
toReturn.NSMode = Slirp
break
}
// if not slirp we use bridge
// if root we use bridge
fallthrough
case ns == string(Bridge), strings.HasPrefix(ns, string(Bridge)+":"):
toReturn.NSMode = Bridge