From 70e01c5e47be87b605a182d8fbe57f374b269dab Mon Sep 17 00:00:00 2001 From: Jing Xu Date: Thu, 25 Feb 2021 08:45:27 -0800 Subject: [PATCH] Use Lstat in plugin watcher to avoid Windows problem User Lstat in plugin watcher due to Windows issue Change-Id: I4f9b808829f1a56dc622e343c291d3ffc316f416 --- pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go b/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go index f4cacfe0316..b0cfa52d281 100644 --- a/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go +++ b/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go @@ -159,7 +159,7 @@ func (w *Watcher) traversePluginDir(dir string) error { func (w *Watcher) handleCreateEvent(event fsnotify.Event) error { klog.V(6).Infof("Handling create event: %v", event) - fi, err := os.Stat(event.Name) + fi, err := os.Lstat(event.Name) if err != nil { return fmt.Errorf("stat file %s failed: %v", event.Name, err) }