New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change aws encryptedCheck to exponential backoff #78601
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -225,12 +225,13 @@ const ( | |
createTagFactor = 2.0 | ||
createTagSteps = 9 | ||
|
||
// encryptedCheck* is configuration of poll for created volume to check | ||
// volumeCreate* is configuration of exponential backoff for created volume to check | ||
// it has not been silently removed by AWS. | ||
// On a random AWS account (shared among several developers) it took 4s on | ||
// average. | ||
encryptedCheckInterval = 1 * time.Second | ||
encryptedCheckTimeout = 30 * time.Second | ||
// average, 8s max. | ||
volumeCreateInitialDelay = 5 * time.Second | ||
volumeCreateBackoffFactor = 1.2 | ||
volumeCreateBackoffSteps = 10 | ||
|
||
// 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 | ||
|
@@ -2419,8 +2420,12 @@ func (c *Cloud) waitUntilVolumeAvailable(volumeName KubernetesVolumeID) error { | |
// Unreachable code | ||
return err | ||
} | ||
|
||
err = wait.Poll(encryptedCheckInterval, encryptedCheckTimeout, func() (done bool, err error) { | ||
backoff := wait.Backoff{ | ||
Duration: volumeCreateInitialDelay, | ||
Factor: volumeCreateBackoffFactor, | ||
Steps: volumeCreateBackoffSteps, | ||
} | ||
err = wait.ExponentialBackoff(backoff, func() (done bool, err error) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, that could save us a What if we use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am fine with adding |
||
vol, err := disk.describeVolume() | ||
if err != nil { | ||
return true, err | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this is no longer accurate