From 87243f49a4896b591e81a7d283f820b0de11fd73 Mon Sep 17 00:00:00 2001 From: fredkan Date: Thu, 15 Aug 2019 14:19:51 +0800 Subject: [PATCH 1/3] fix error set csiplugin attachable --- pkg/kubelet/volumemanager/cache/actual_state_of_world.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go index 5ecec2342d383..9db3baf03cc38 100644 --- a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go +++ b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go @@ -398,7 +398,7 @@ func (asw *actualStateOfWorld) addVolume( } pluginIsAttachable := false - if _, ok := volumePlugin.(volume.AttachableVolumePlugin); ok { + if thePlugin, err := asw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec); err != nil && thePlugin != nil { pluginIsAttachable = true } From 6524b83d53adb2c1fa036967a317dd939e3586a5 Mon Sep 17 00:00:00 2001 From: fredkan Date: Thu, 15 Aug 2019 20:41:32 +0800 Subject: [PATCH 2/3] error config attachable plugin --- pkg/kubelet/volumemanager/cache/actual_state_of_world.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go index 9db3baf03cc38..e5326c530c45a 100644 --- a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go +++ b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go @@ -398,7 +398,7 @@ func (asw *actualStateOfWorld) addVolume( } pluginIsAttachable := false - if thePlugin, err := asw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec); err != nil && thePlugin != nil { + if thePlugin, err := asw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec); err == nil && thePlugin != nil { pluginIsAttachable = true } From 67aeb09c6a400115baf9b69f44dbd1edf76b1c88 Mon Sep 17 00:00:00 2001 From: fredkan Date: Thu, 15 Aug 2019 22:29:18 +0800 Subject: [PATCH 3/3] error config attachable plugin --- pkg/kubelet/volumemanager/cache/actual_state_of_world.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go index e5326c530c45a..d29770bdbfacd 100644 --- a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go +++ b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go @@ -398,7 +398,7 @@ func (asw *actualStateOfWorld) addVolume( } pluginIsAttachable := false - if thePlugin, err := asw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec); err == nil && thePlugin != nil { + if attachablePlugin, err := asw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec); err == nil && attachablePlugin != nil { pluginIsAttachable = true }