summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go11
-rw-r--r--vendor/modules.txt2
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