mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 01:40:13 +00:00
Merge pull request #78248 from cwdsuzhou/optimize_err_log
Add error info for plugin do not support attachment
This commit is contained in:
commit
306b6f330d
@ -287,6 +287,9 @@ func (asw *actualStateOfWorld) AddVolumeNode(
|
||||
}
|
||||
attachableVolumePlugin, err := asw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec)
|
||||
if err != nil || attachableVolumePlugin == nil {
|
||||
if attachableVolumePlugin == nil {
|
||||
err = fmt.Errorf("plugin do not support attachment")
|
||||
}
|
||||
return "", fmt.Errorf(
|
||||
"failed to get AttachablePlugin from volumeSpec for volume %q err=%v",
|
||||
volumeSpec.Name(),
|
||||
|
@ -225,6 +225,9 @@ func (dsw *desiredStateOfWorld) AddPod(
|
||||
|
||||
attachableVolumePlugin, err := dsw.volumePluginMgr.FindAttachablePluginBySpec(volumeSpec)
|
||||
if err != nil || attachableVolumePlugin == nil {
|
||||
if attachableVolumePlugin == nil {
|
||||
err = fmt.Errorf("plugin do not support attachment")
|
||||
}
|
||||
return "", fmt.Errorf(
|
||||
"failed to get AttachablePlugin from volumeSpec for volume %q err=%v",
|
||||
volumeSpec.Name(),
|
||||
|
Loading…
Reference in New Issue
Block a user