Merge pull request #82964 from yutedz/csi-drv-sync-err
Check error return from WaitForCacheSync
This commit is contained in:
@@ -743,7 +743,9 @@ func (p *csiPlugin) skipAttach(driver string) (bool, error) {
|
|||||||
|
|
||||||
kletHost, ok := p.host.(volume.KubeletVolumeHost)
|
kletHost, ok := p.host.(volume.KubeletVolumeHost)
|
||||||
if ok {
|
if ok {
|
||||||
kletHost.WaitForCacheSync()
|
if err := kletHost.WaitForCacheSync(); err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.csiDriverLister == nil {
|
if p.csiDriverLister == nil {
|
||||||
@@ -782,7 +784,9 @@ func (p *csiPlugin) supportsVolumeLifecycleMode(driver string, volumeMode storag
|
|||||||
if p.csiDriverLister != nil {
|
if p.csiDriverLister != nil {
|
||||||
kletHost, ok := p.host.(volume.KubeletVolumeHost)
|
kletHost, ok := p.host.(volume.KubeletVolumeHost)
|
||||||
if ok {
|
if ok {
|
||||||
kletHost.WaitForCacheSync()
|
if err := kletHost.WaitForCacheSync(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c, err := p.csiDriverLister.Get(driver)
|
c, err := p.csiDriverLister.Get(driver)
|
||||||
|
Reference in New Issue
Block a user