diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-05-12 14:28:10 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-05-12 14:28:10 +0200 |
commit | 5cfd09073c1858aae3d08877270c1b0229bbc647 (patch) | |
tree | 1c8d34f53a5dbe8ed5f9044817f3eea809577391 /vendor | |
parent | 968741d6de3d0d5257a4457f4f0ca055a64f1c95 (diff) | |
download | podman-5cfd09073c1858aae3d08877270c1b0229bbc647.tar.gz podman-5cfd09073c1858aae3d08877270c1b0229bbc647.tar.bz2 podman-5cfd09073c1858aae3d08877270c1b0229bbc647.zip |
vendor crio/ocicni@v0.2.0
Fixes: #5193
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go | 11 | ||||
-rw-r--r-- | vendor/modules.txt | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go b/vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go index 0cdbf14b7..a8e2fbfa8 100644 --- a/vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go +++ b/vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go @@ -3,7 +3,6 @@ package ocicni import ( "context" "encoding/json" - "errors" "fmt" "io/ioutil" "net" @@ -62,7 +61,7 @@ type cniNetwork struct { config *libcni.NetworkConfigList } -var errMissingDefaultNetwork = errors.New("Missing CNI default network") +var errMissingDefaultNetwork = "No CNI configuration file in %s. Has your network provider started?" type podLock struct { // Count of in-flight operations for this pod; when this reaches zero @@ -413,7 +412,7 @@ func (plugin *cniNetworkPlugin) getDefaultNetwork() *cniNetwork { // to attach the pod to. func (plugin *cniNetworkPlugin) networksAvailable(podNetwork *PodNetwork) error { if len(podNetwork.Networks) == 0 && plugin.getDefaultNetwork() == nil { - return errMissingDefaultNetwork + return fmt.Errorf(errMissingDefaultNetwork, plugin.confDir) } return nil } @@ -504,8 +503,8 @@ func (plugin *cniNetworkPlugin) forEachNetwork(podNetwork *PodNetwork, fromCache var newRt *libcni.RuntimeConf cniNet, newRt, err = plugin.loadNetworkFromCache(network.Name, rt) if err != nil { - logrus.Errorf("error loading cached network config: %v", err) - // fall back to loading from existing plugins on disk + logrus.Debugf("error loading cached network config: %v", err) + logrus.Debugf("falling back to loading from existing plugins on disk") } else { // Use the updated RuntimeConf rt = newRt @@ -854,7 +853,7 @@ func buildCNIRuntimeConf(cacheDir string, podNetwork *PodNetwork, ifName string, func (plugin *cniNetworkPlugin) Status() error { if plugin.getDefaultNetwork() == nil { - return errMissingDefaultNetwork + return fmt.Errorf(errMissingDefaultNetwork, plugin.confDir) } return nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index f1c5085bf..0bd684c62 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -201,7 +201,7 @@ github.com/coreos/go-systemd/v22/dbus github.com/coreos/go-systemd/v22/internal/dlopen github.com/coreos/go-systemd/v22/journal github.com/coreos/go-systemd/v22/sdjournal -# github.com/cri-o/ocicni v0.1.1-0.20190920040751-deac903fd99b +# github.com/cri-o/ocicni v0.2.0 github.com/cri-o/ocicni/pkg/ocicni # github.com/cyphar/filepath-securejoin v0.2.2 github.com/cyphar/filepath-securejoin |