awscloud/secure-instance: retry for 10 minutes
retry for 10 x 60sec. and don't log retries twice
This commit is contained in:
parent
4ec8894244
commit
446e8448e3
1 changed files with 2 additions and 2 deletions
|
|
@ -229,7 +229,7 @@ func (a *AWS) TerminateSecureInstance(si *SecureInstance) error {
|
||||||
|
|
||||||
func (a *AWS) terminatePreviousSI(hostInstanceID string) (string, error) {
|
func (a *AWS) terminatePreviousSI(hostInstanceID string) (string, error) {
|
||||||
var retryCount int
|
var retryCount int
|
||||||
const maxRetries = 3
|
const maxRetries = 10
|
||||||
|
|
||||||
descrInstancesOutput, err := a.ec2.DescribeInstances(
|
descrInstancesOutput, err := a.ec2.DescribeInstances(
|
||||||
context.Background(),
|
context.Background(),
|
||||||
|
|
@ -292,7 +292,7 @@ func (a *AWS) terminatePreviousSI(hostInstanceID string) (string, error) {
|
||||||
|
|
||||||
TerminatedWaiterOptions := func(o *ec2.InstanceTerminatedWaiterOptions) {
|
TerminatedWaiterOptions := func(o *ec2.InstanceTerminatedWaiterOptions) {
|
||||||
o.Retryable = retryFunction
|
o.Retryable = retryFunction
|
||||||
o.LogWaitAttempts = true
|
o.MinDelay = 60 * time.Second
|
||||||
}
|
}
|
||||||
|
|
||||||
instTermWaiter := ec2.NewInstanceTerminatedWaiter(a.ec2)
|
instTermWaiter := ec2.NewInstanceTerminatedWaiter(a.ec2)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue