rename and change aws backoff vars

This commit is contained in:
Ruslan Gustomiasov 2019-06-08 20:10:05 +02:00
parent e691f7d493
commit 98dd1336b0

View File

@ -229,9 +229,9 @@ const (
// it has not been silently removed by AWS. // it has not been silently removed by AWS.
// On a random AWS account (shared among several developers) it took 4s on // On a random AWS account (shared among several developers) it took 4s on
// average, 8s max. // average, 8s max.
encryptedCheckInitialDelay = 1 * time.Second volumeCreateInitialDelay = 5 * time.Second
encryptedCheckFactor = 2.0 volumeCreateBackoffFactor = 1.2
encryptedCheckSteps = 8 volumeCreateBackoffSteps = 10
// Number of node names that can be added to a filter. The AWS limit is 200 // Number of node names that can be added to a filter. The AWS limit is 200
// but we are using a lower limit on purpose // but we are using a lower limit on purpose
@ -2421,9 +2421,9 @@ func (c *Cloud) waitUntilVolumeAvailable(volumeName KubernetesVolumeID) error {
return err return err
} }
backoff := wait.Backoff{ backoff := wait.Backoff{
Duration: encryptedCheckInitialDelay, Duration: volumeCreateInitialDelay,
Factor: encryptedCheckFactor, Factor: volumeCreateBackoffFactor,
Steps: encryptedCheckSteps, Steps: volumeCreateBackoffSteps,
} }
err = wait.ExponentialBackoff(backoff, func() (done bool, err error) { err = wait.ExponentialBackoff(backoff, func() (done bool, err error) {
vol, err := disk.describeVolume() vol, err := disk.describeVolume()