Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove returned value of func handleCreateEvent #79011

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 2 additions & 7 deletions pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ func (w *Watcher) Start(stopCh <-chan struct{}) error {
klog.Errorf("error %v when handling create event: %s", err, event)
}
} else if event.Op&fsnotify.Remove == fsnotify.Remove {
err := w.handleDeleteEvent(event)
if err != nil {
klog.Errorf("error %v when handling delete event: %s", err, event)
}
w.handleDeleteEvent(event)
}
continue
case err := <-fsWatcher.Errors:
Expand Down Expand Up @@ -219,14 +216,12 @@ func (w *Watcher) handlePluginRegistration(socketPath string) error {
return nil
}

func (w *Watcher) handleDeleteEvent(event fsnotify.Event) error {
func (w *Watcher) handleDeleteEvent(event fsnotify.Event) {
klog.V(6).Infof("Handling delete event: %v", event)

socketPath := event.Name
klog.V(2).Infof("Removing socket path %s from desired state cache", socketPath)
w.desiredStateOfWorld.RemovePlugin(socketPath)

return nil
}

// While deprecated dir is supported, to add extra protection around #69015
Expand Down