Skip to content

Commit

Permalink
Add more error types to trigger retries (#25827)
Browse files Browse the repository at this point in the history
* add more scenarios to trigger retries

* add error types to enum
  • Loading branch information
usamasaqib committed May 23, 2024
1 parent 09a230f commit d47c6d7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/new-e2e/system-probe/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const (
insufficientCapacityError
aria2cMissingStatusError
ec2StateChangeTimeoutError
ioTimeout
tcp22ConnectionRefused
)

type handledError struct {
Expand Down Expand Up @@ -74,6 +76,16 @@ var handledErrorsLs = []handledError{
metric: "ec2-timeout-state-change",
action: retryStack | emitMetric,
},
{
errorType: ioTimeout,
errorString: "i/o timeout",
action: retryStack,
},
{
errorType: tcp22ConnectionRefused,
errorString: "failed attempts: dial tcp :22: connect: connection refused",
action: retryStack,
},
}

func errorMetric(errType string) datadogV2.MetricPayload {
Expand Down

0 comments on commit d47c6d7

Please sign in to comment.