Merge pull request #1939 from mheon/no_firewall_if_rootless
Don't initialize CNI when running as rootless
This commit is contained in:
commit
aba52cf588
|
@ -521,11 +521,13 @@ func makeRuntime(runtime *Runtime) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up the CNI net plugin
|
// Set up the CNI net plugin
|
||||||
netPlugin, err := ocicni.InitCNI(runtime.config.CNIDefaultNetwork, runtime.config.CNIConfigDir, runtime.config.CNIPluginDir...)
|
if !rootless.IsRootless() {
|
||||||
if err != nil {
|
netPlugin, err := ocicni.InitCNI(runtime.config.CNIDefaultNetwork, runtime.config.CNIConfigDir, runtime.config.CNIPluginDir...)
|
||||||
return errors.Wrapf(err, "error configuring CNI network plugin")
|
if err != nil {
|
||||||
|
return errors.Wrapf(err, "error configuring CNI network plugin")
|
||||||
|
}
|
||||||
|
runtime.netPlugin = netPlugin
|
||||||
}
|
}
|
||||||
runtime.netPlugin = netPlugin
|
|
||||||
|
|
||||||
// Set up a firewall backend
|
// Set up a firewall backend
|
||||||
backendType := ""
|
backendType := ""
|
||||||
|
|
Loading…
Reference in New Issue