From ac99127ce0bee913549fb80e2a96d294cf71762d Mon Sep 17 00:00:00 2001 From: Magnus Schieder <50337967+m-schieder@users.noreply.github.com> Date: Wed, 16 Sep 2026 13:58:23 +0200 Subject: [PATCH] Add retry for 'no route to host' (#94) --- internal/constants/constants.go | 4 ++-- internal/manage/actions/migrations/migrations.go | 1 + internal/manage/actions/migrations/migrations_test.go | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/constants/constants.go b/internal/constants/constants.go index e3f6de2..de315d6 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -230,10 +230,10 @@ const ( FinalizationStatusFailed string = "finalization_failed" // MigrationMaxRetries is the maximum number of retry attempts for failed migration requests - MigrationMaxRetries int = 5 + MigrationMaxRetries int = 8 // MigrationRetryDelay is the delay between retry attempts - MigrationRetryDelay time.Duration = 5 * time.Second + MigrationRetryDelay time.Duration = 3 * time.Second // MigrationTotalTimeout is the maximum time allowed for all retry attempts MigrationTotalTimeout time.Duration = 3 * time.Minute diff --git a/internal/manage/actions/migrations/migrations.go b/internal/manage/actions/migrations/migrations.go index 953b82f..10fc707 100644 --- a/internal/manage/actions/migrations/migrations.go +++ b/internal/manage/actions/migrations/migrations.go @@ -361,6 +361,7 @@ func isRetryableError(err error) bool { "eof", "broken pipe", "i/o timeout", + "connect: no route to host", } for _, pattern := range retryablePatterns { diff --git a/internal/manage/actions/migrations/migrations_test.go b/internal/manage/actions/migrations/migrations_test.go index 9d4298d..a5405b9 100644 --- a/internal/manage/actions/migrations/migrations_test.go +++ b/internal/manage/actions/migrations/migrations_test.go @@ -211,6 +211,7 @@ func TestIsRetryableError(t *testing.T) { {"connection reset", "connection reset by peer", true}, {"timeout", "i/o timeout", true}, {"eof", "unexpected EOF", true}, + {"no route to host", "connect: no route to host", true}, {"server error 503", "server returned 503", true}, {"server error 502", "bad gateway 502", true}, {"server error 504", "gateway timeout 504", true},