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
change aws encryptedCheck to exponential backoff #78601
Conversation
Hi @Loqutus. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @gnufied |
/ok-to-test |
See #78596 - what numbers are better? Did anyone run some benchmark? |
encryptedCheckInterval = 1 * time.Second | ||
encryptedCheckTimeout = 30 * time.Second | ||
// average, 8s max. | ||
encryptedCheckInitialDelay = 1 * time.Second |
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.
Can you please rename the variables? They're used for generic volume creation check now.
I did some benchmarking btw. It looks like on average it takes on average between 5-6 seconds for volume to become available after creation. So, defaults proposed in this PR is not great. I propose we change, default to:
The idea is - exponential backoff fires first call without wait and subsequent calls are more in line with expectation. Also this will cause the whole operation to wait for 129 seconds. |
It might even be better to not poll volume immediately after creation at all because volume is never available immediately after creation. But I see that |
@Loqutus are you planning to fix this PR? It is something that I would prefer that we fix sooner than later. |
/retest |
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.
Could you squash the commits?
@@ -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 |
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.
it has not been silently removed by AWS
Seems like this is no longer accurate
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 comment
The reason will be displayed to describe this comment to others. Learn more.
It might even be better to not poll volume immediately after creation at all because volume is never available immediately after creation. But I see that ExponentialBackoff does not offer a way to do that.
Yeah, that could save us a DescribeVolume
request, which might be helpful for clusters hitting the AWS quota limit.
What if we use PollUntil
instead? PollUntil
waits the interval before firing the function.
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.
I am fine with adding time.Sleep(5 * time.Second)
before proceeding with exponential backoff. It has same effect as anything else and works with exponential backoff..
/lgtm |
/retest |
Do you mind backporting this fix to 1.15 and 1.14 versions? /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gnufied, loqutus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Review the full test history for this PR. Silence the bot with an |
3 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
…8601-upstream-release-1.14 Automated cherry pick of #78601: change aws encryptedCheck to exponential backoff
…8601-upstream-release-1.15 Automated cherry pick of #78601: change aws encryptedCheck to exponential backoff
What type of PR is this?
/kind feature
What this PR does / why we need it:
changing poll to exponential backoff for waiting to create encrypted aws volumes
Which issue(s) this PR fixes:
Fixes #77741
Special notes for your reviewer:
Does this PR introduce a user-facing change?: