Skip to content

Commit

Permalink
Remove rootless_networking option from containers.conf
Browse files Browse the repository at this point in the history
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 containers/common#895

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Jan 20, 2022
1 parent 206e57e commit ee039b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion pkg/machine/ignition.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ ExecStart=/usr/bin/sleep infinity
`
containers := `[containers]
netns="bridge"
rootless_networking="cni"
`
rootContainers := `[engine]
machine_enabled=true
Expand Down
4 changes: 2 additions & 2 deletions pkg/specgen/namespaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee039b7

Please sign in to comment.