diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-01-12 10:14:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-12 10:14:44 -0500 |
commit | 3783c3fe21e00a6854c968f7e0c03e611acaa0fa (patch) | |
tree | c05cc1f83e4af69457b5b1fc7c0c17d97bbaacca /libpod | |
parent | 378bed4869dccc4a886a8888aa5cd7dc13cdaee2 (diff) | |
parent | 240e5789d409d82453b72f87862f7e71efa381e4 (diff) | |
download | podman-3783c3fe21e00a6854c968f7e0c03e611acaa0fa.tar.gz podman-3783c3fe21e00a6854c968f7e0c03e611acaa0fa.tar.bz2 podman-3783c3fe21e00a6854c968f7e0c03e611acaa0fa.zip |
Merge pull request #215 from mheon/update_cni
Update OCICNI vendor and plugin directories
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/networking.go | 3 | ||||
-rw-r--r-- | libpod/options.go | 2 | ||||
-rw-r--r-- | libpod/runtime.go | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/libpod/networking.go b/libpod/networking.go index 456830708..41bd65d25 100644 --- a/libpod/networking.go +++ b/libpod/networking.go @@ -38,7 +38,8 @@ func (r *Runtime) createNetNS(ctr *Container) (err error) { podNetwork := getPodNetwork(ctr.ID(), ctr.Name(), ctrNS.Path(), ctr.config.PortMappings) - if err := r.netPlugin.SetUpPod(podNetwork); err != nil { + _, err = r.netPlugin.SetUpPod(podNetwork) + if err != nil { return errors.Wrapf(err, "error configuring network namespace for container %s", ctr.ID()) } diff --git a/libpod/options.go b/libpod/options.go index cd1ad5eda..8097f3a64 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -275,7 +275,7 @@ func WithCNIPluginDir(dir string) RuntimeOption { return ErrRuntimeFinalized } - rt.config.CNIPluginDir = dir + rt.config.CNIPluginDir = []string{dir} return nil } diff --git a/libpod/runtime.go b/libpod/runtime.go index aed6acd86..d0aa481cf 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -51,7 +51,7 @@ type RuntimeConfig struct { MaxLogSize int64 NoPivotRoot bool CNIConfigDir string - CNIPluginDir string + CNIPluginDir []string } var ( @@ -73,7 +73,7 @@ var ( MaxLogSize: -1, NoPivotRoot: false, CNIConfigDir: "/etc/cni/net.d/", - CNIPluginDir: "/usr/libexec/cni", + CNIPluginDir: []string{"/usr/libexec/cni", "/opt/cni/bin"}, } ) @@ -173,7 +173,7 @@ func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) { } // Set up the CNI net plugin - netPlugin, err := ocicni.InitCNI(runtime.config.CNIConfigDir, runtime.config.CNIPluginDir) + netPlugin, err := ocicni.InitCNI(runtime.config.CNIConfigDir, runtime.config.CNIPluginDir...) if err != nil { return nil, errors.Wrapf(err, "error configuring CNI network plugin") } |