diff --git a/vendor.conf b/vendor.conf index e0be7fe84..93eaf6147 100644 --- a/vendor.conf +++ b/vendor.conf @@ -8,7 +8,7 @@ github.com/containerd/fifo fbfb6a11ec671efbe94ad1c12c2e98773f19e1e6 github.com/containernetworking/cni v0.6.0 github.com/containernetworking/plugins v0.6.0 github.com/coreos/go-systemd 48702e0da86bd25e76cfef347e2adeb434a0d0a6 -github.com/cri-o/ocicni 73f1309d6bc5c3eac78c1382408921cd771ff22e +github.com/cri-o/ocicni fc9c77cc55795c09bf1f74b2afd92078a793a69e github.com/davecgh/go-spew v1.1.0 github.com/docker/distribution b38e5838b7b2f2ad48e06ec4b500011976080621 github.com/docker/docker cc4da8112814cdbb00dbf23370f9ed764383de1f 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 03918bfa4..f1a973bdb 100644 --- a/vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go +++ b/vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go @@ -3,6 +3,7 @@ package ocicni import ( "errors" "fmt" + "os" "os/exec" "sort" "strings" @@ -158,6 +159,11 @@ func InitCNI(pluginDir string, cniDirs ...string) (CNIPlugin, error) { return &cniNoOp{}, nil } + // Fail loudly if plugin directory doesn't exist, because fsnotify watcher + // won't be able to watch it. + if _, err := os.Stat(pluginDir); err != nil { + return nil, err + } // We do not have a default network, we start the monitoring thread. go plugin.monitorNetDir() }