Skip to content

Commit e9f2ff3

Browse files
authored
Increased backoff time for repeated login attempts (#194)
The exponential backoff algorithm causes svc accounts to be blocked after 11 login attempts. To stop the accounts being blocked on a single set of login attempts the backoff algorithm has been slowed down. At this stage, I am still unsure of the time limit over which these 11 attempts will block an account. This means that multiple retries of the entire CI pipeline may still block a svc account. Signed-off-by: Jamie Leppard <[email protected]> Co-authored-by: Jamie Leppard <[email protected]>
1 parent 7e87659 commit e9f2ff3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cmd/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func init() {
8383
&agent.BackoffMaxTime,
8484
"backoff-max-time",
8585
"",
86-
5*time.Minute,
86+
10*time.Minute,
8787
"Max time for retrying failed data gatherers (given as XhYmZs).",
8888
)
8989

pkg/agent/run.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ func gatherAndOutputData(ctx context.Context, config Config, preflightClient *cl
176176
log.Println("Data saved locally to", OutputPath)
177177
} else {
178178
backOff := backoff.NewExponentialBackOff()
179+
backOff.InitialInterval = 30 * time.Second
180+
backOff.MaxInterval = 3 * time.Minute
179181
backOff.MaxElapsedTime = BackoffMaxTime
180182
post := func() error {
181183
return postData(config, preflightClient, readings)

0 commit comments

Comments
 (0)