diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-12-04 12:55:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-04 12:55:40 -0800 |
commit | aba52cf588f05a651d0d748224bfb2f807b40c7b (patch) | |
tree | e435dec5b6de044bc87bd7c4aaa525853e10b62a /libpod | |
parent | b81f640bb5a821a1f44b6899a01d9523a38ec351 (diff) | |
parent | 32aa45e344abc3e9501b0fddbac099285869e224 (diff) | |
download | podman-aba52cf588f05a651d0d748224bfb2f807b40c7b.tar.gz podman-aba52cf588f05a651d0d748224bfb2f807b40c7b.tar.bz2 podman-aba52cf588f05a651d0d748224bfb2f807b40c7b.zip |
Merge pull request #1939 from mheon/no_firewall_if_rootless
Don't initialize CNI when running as rootless
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/runtime.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index e043715b1..55a300bb0 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -521,11 +521,13 @@ func makeRuntime(runtime *Runtime) (err error) { } // Set up the CNI net plugin - netPlugin, err := ocicni.InitCNI(runtime.config.CNIDefaultNetwork, runtime.config.CNIConfigDir, runtime.config.CNIPluginDir...) - if err != nil { - return errors.Wrapf(err, "error configuring CNI network plugin") + if !rootless.IsRootless() { + netPlugin, err := ocicni.InitCNI(runtime.config.CNIDefaultNetwork, runtime.config.CNIConfigDir, runtime.config.CNIPluginDir...) + if err != nil { + return errors.Wrapf(err, "error configuring CNI network plugin") + } + runtime.netPlugin = netPlugin } - runtime.netPlugin = netPlugin // Set up a firewall backend backendType := "" |