Fixed issue in plugin.go for bug #106696
Fixed issue in plugin.go where valid plugin events would be skipped if any plugin had an error. This meant that valid plugins would never be installed if another was in an error state as the events fired only once.
This commit is contained in:
@@ -746,11 +746,10 @@ func (pm *VolumePluginMgr) logDeprecation(plugin string) {
|
||||
// If it is, initialize all probed plugins and replace the cache with them.
|
||||
func (pm *VolumePluginMgr) refreshProbedPlugins() {
|
||||
events, err := pm.prober.Probe()
|
||||
if err != nil {
|
||||
klog.ErrorS(err, "Error dynamically probing plugins")
|
||||
return // Use cached plugins upon failure.
|
||||
}
|
||||
|
||||
// because the probe function can return a list of valid plugins
|
||||
// even when an error is present we still must add the plugins
|
||||
// or they will be skipped because each event only fires once
|
||||
for _, event := range events {
|
||||
if event.Op == ProbeAddOrUpdate {
|
||||
if err := pm.initProbedPlugin(event.Plugin); err != nil {
|
||||
@@ -767,6 +766,11 @@ func (pm *VolumePluginMgr) refreshProbedPlugins() {
|
||||
"pluginName", event.Plugin.GetPluginName())
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
klog.ErrorS(err, "Error dynamically probing plugins")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// ListVolumePluginWithLimits returns plugins that have volume limits on nodes
|
||||
|
Reference in New Issue
Block a user