mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Merge pull request #82964 from yutedz/csi-drv-sync-err
Check error return from WaitForCacheSync
This commit is contained in:
commit
6e960ef466
@ -743,7 +743,9 @@ func (p *csiPlugin) skipAttach(driver string) (bool, error) {
|
||||
|
||||
kletHost, ok := p.host.(volume.KubeletVolumeHost)
|
||||
if ok {
|
||||
kletHost.WaitForCacheSync()
|
||||
if err := kletHost.WaitForCacheSync(); err != nil {
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
|
||||
if p.csiDriverLister == nil {
|
||||
@ -782,7 +784,9 @@ func (p *csiPlugin) supportsVolumeLifecycleMode(driver string, volumeMode storag
|
||||
if p.csiDriverLister != nil {
|
||||
kletHost, ok := p.host.(volume.KubeletVolumeHost)
|
||||
if ok {
|
||||
kletHost.WaitForCacheSync()
|
||||
if err := kletHost.WaitForCacheSync(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
c, err := p.csiDriverLister.Get(driver)
|
||||
|
Loading…
Reference in New Issue
Block a user