Skip to content

Commit

Permalink
Retry RDS reboot-in-progress errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nijave committed Aug 14, 2020
1 parent fb53d69 commit e1a4f5d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aws/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,13 @@ func (c *Config) Client() (interface{}, error) {
}
})

client.rdsconn.Handlers.Retry.PushBack(func(r *request.Request) {
// Sometimes Terraform ops restart the DB while applying config during a multi-step update process
if isAWSErr(r.Error, rds.ErrCodeInvalidDBInstanceStateFault, "Instance cannot currently reboot due to an in-progress management operation") {
r.Retryable = aws.Bool(true)
}
})

client.storagegatewayconn.Handlers.Retry.PushBack(func(r *request.Request) {
// InvalidGatewayRequestException: The specified gateway proxy network connection is busy.
if isAWSErr(r.Error, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified gateway proxy network connection is busy") {
Expand Down

0 comments on commit e1a4f5d

Please sign in to comment.