mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Retry when checking Azure storage account readiness
This commit is contained in:
parent
acbfde3914
commit
5f088973ce
@ -471,20 +471,22 @@ func (c *BlobDiskController) ensureDefaultContainer(storageAccountName string) e
|
|||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(4).Infof("azureDisk - GetStorageAccount:%s err %s", storageAccountName, err.Error())
|
glog.V(4).Infof("azureDisk - GetStorageAccount:%s err %s", storageAccountName, err.Error())
|
||||||
return false, err
|
return false, nil // error performing the query - retryable
|
||||||
}
|
}
|
||||||
|
|
||||||
if provisionState == storage.Succeeded {
|
if provisionState == storage.Succeeded {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.V(4).Infof("azureDisk - GetStorageAccount:%s not ready yet", storageAccountName)
|
glog.V(4).Infof("azureDisk - GetStorageAccount:%s not ready yet (not flagged Succeeded by ARM)", storageAccountName)
|
||||||
// leave it for next loop/sync loop
|
return false, nil // back off and see if the account becomes ready on next retry
|
||||||
return false, fmt.Errorf("azureDisk - Account %s has not been flagged Succeeded by ARM", storageAccountName)
|
|
||||||
})
|
})
|
||||||
// we have failed to ensure that account is ready for us to create
|
// we have failed to ensure that account is ready for us to create
|
||||||
// the default vhd container
|
// the default vhd container
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err == kwait.ErrWaitTimeout {
|
||||||
|
return fmt.Errorf("azureDisk - timed out waiting for storage account %s to become ready", storageAccountName)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user