mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Add error info for plugin do not support attachment
This commit is contained in:
parent
81a61ae0e3
commit
e39ec09975
@ -287,6 +287,9 @@ func (asw *actualStateOfWorld) AddVolumeNode(
|
|||||||
}
|
}
|
||||||
attachableVolumePlugin, err := asw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec)
|
attachableVolumePlugin, err := asw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec)
|
||||||
if err != nil || attachableVolumePlugin == nil {
|
if err != nil || attachableVolumePlugin == nil {
|
||||||
|
if attachableVolumePlugin == nil {
|
||||||
|
err = fmt.Errorf("plugin do not support attachment")
|
||||||
|
}
|
||||||
return "", fmt.Errorf(
|
return "", fmt.Errorf(
|
||||||
"failed to get AttachablePlugin from volumeSpec for volume %q err=%v",
|
"failed to get AttachablePlugin from volumeSpec for volume %q err=%v",
|
||||||
volumeSpec.Name(),
|
volumeSpec.Name(),
|
||||||
|
@ -225,6 +225,9 @@ func (dsw *desiredStateOfWorld) AddPod(
|
|||||||
|
|
||||||
attachableVolumePlugin, err := dsw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec)
|
attachableVolumePlugin, err := dsw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec)
|
||||||
if err != nil || attachableVolumePlugin == nil {
|
if err != nil || attachableVolumePlugin == nil {
|
||||||
|
if attachableVolumePlugin == nil {
|
||||||
|
err = fmt.Errorf("plugin do not support attachment")
|
||||||
|
}
|
||||||
return "", fmt.Errorf(
|
return "", fmt.Errorf(
|
||||||
"failed to get AttachablePlugin from volumeSpec for volume %q err=%v",
|
"failed to get AttachablePlugin from volumeSpec for volume %q err=%v",
|
||||||
volumeSpec.Name(),
|
volumeSpec.Name(),
|
||||||
|
Loading…
Reference in New Issue
Block a user