File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
pkg/asset/installconfig/aws Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 66 "os"
77 "path/filepath"
88 "sync"
9+ "time"
910
1011 survey "github.com/AlecAivazis/survey/v2"
1112 "github.com/aws/aws-sdk-go-v2/aws"
@@ -31,6 +32,9 @@ const (
3132
3233 // RetryMaxAttempts is the total number of times an API request is retried.
3334 RetryMaxAttempts = 25
35+
36+ // RetryBackoffDuration is max duration between retried attempts.
37+ RetryBackoffDuration = 300 * time .Second
3438)
3539
3640var (
@@ -47,6 +51,12 @@ func getDefaultConfigOptions() ConfigOptions {
4751 return retry .NewStandard (func (so * retry.StandardOptions ) {
4852 so .MaxAttempts = RetryMaxAttempts
4953
54+ // The SDK v2 implements exponential backoff and jitter by default, but with 20s max backoff duration,
55+ // which can cause the installer to aggressively retry.
56+ // Thus, setting this to a higher value to allow more rest time and ease AWS API load.
57+ // In SDK v1, this value was also 300s: https://github.com/hashicorp/terraform-provider-aws/issues/36837
58+ so .Backoff = retry .NewExponentialJitterBackoff (RetryBackoffDuration )
59+
5060 // The SDK v2 introduces a new client-side rate-limiting mechanism in the standard retry.
5161 // The default settings are not a good fit for the installer, especially the destroy code.
5262 // Until we figure out a good settings, we disable it to align with SDK v1 behavior.
You can’t perform that action at this time.
0 commit comments