From 446e8448e318498f92b67b97ce152d8a5f1f0c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Sch=C3=BCller?= Date: Thu, 21 Nov 2024 19:48:52 +0100 Subject: [PATCH] awscloud/secure-instance: retry for 10 minutes retry for 10 x 60sec. and don't log retries twice --- internal/cloud/awscloud/secure-instance.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cloud/awscloud/secure-instance.go b/internal/cloud/awscloud/secure-instance.go index ce414961c..19c6dc84b 100644 --- a/internal/cloud/awscloud/secure-instance.go +++ b/internal/cloud/awscloud/secure-instance.go @@ -229,7 +229,7 @@ func (a *AWS) TerminateSecureInstance(si *SecureInstance) error { func (a *AWS) terminatePreviousSI(hostInstanceID string) (string, error) { var retryCount int - const maxRetries = 3 + const maxRetries = 10 descrInstancesOutput, err := a.ec2.DescribeInstances( context.Background(), @@ -292,7 +292,7 @@ func (a *AWS) terminatePreviousSI(hostInstanceID string) (string, error) { TerminatedWaiterOptions := func(o *ec2.InstanceTerminatedWaiterOptions) { o.Retryable = retryFunction - o.LogWaitAttempts = true + o.MinDelay = 60 * time.Second } instTermWaiter := ec2.NewInstanceTerminatedWaiter(a.ec2)