Pluginwatcher should prevent kubelet from starting if we cannot watch the plugin root

This commit is contained in:
Renaud Gaubert 2018-11-08 23:42:02 +00:00
parent 3a467ff44b
commit 11fef8ba3b

View File

@ -176,9 +176,14 @@ func (w *Watcher) init() error {
// Walks through the plugin directory discover any existing plugin sockets.
// Goroutines started here will be waited for in Stop() before cleaning up.
// Ignore all errors except root dir not being walkable
func (w *Watcher) traversePluginDir(dir string) error {
return w.fs.Walk(dir, func(path string, info os.FileInfo, err error) error {
if err != nil {
if path == dir {
return fmt.Errorf("error accessing path: %s error: %v", path, err)
}
glog.Errorf("error accessing path: %s error: %v", path, err)
return nil
}