mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Check error return from WaitForCacheSync
This commit is contained in:
parent
53b3c8968e
commit
384aaad468
@ -60,8 +60,6 @@ const (
|
|||||||
CsiResyncPeriod = time.Minute
|
CsiResyncPeriod = time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
var deprecatedSocketDirVersions = []string{"0.1.0", "0.2.0", "0.3.0", "0.4.0"}
|
|
||||||
|
|
||||||
type csiPlugin struct {
|
type csiPlugin struct {
|
||||||
host volume.VolumeHost
|
host volume.VolumeHost
|
||||||
blockEnabled bool
|
blockEnabled bool
|
||||||
@ -745,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 {
|
||||||
@ -784,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)
|
||||||
|
Loading…
Reference in New Issue
Block a user