From ccac4789c5f4af4e8e0bcedce50871cbed1f798b Mon Sep 17 00:00:00 2001 From: Dimitri Koshkin Date: Tue, 1 Oct 2024 09:45:09 -0700 Subject: [PATCH 1/2] fix: extend the CAPI warmup timeout When starting up CAPI will try to "warm-up" the configured RuntimeExtensions, and fail if any runtime extension Pods are not up. --- exp/runtime/internal/controllers/warmup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exp/runtime/internal/controllers/warmup.go b/exp/runtime/internal/controllers/warmup.go index 224ca6336de8..d314e8159561 100644 --- a/exp/runtime/internal/controllers/warmup.go +++ b/exp/runtime/internal/controllers/warmup.go @@ -33,7 +33,7 @@ import ( ) const ( - defaultWarmupTimeout = 60 * time.Second + defaultWarmupTimeout = 5 * time.Minute defaultWarmupInterval = 2 * time.Second ) From 6c690d1c587adb35fa279c3edda123e263e94154 Mon Sep 17 00:00:00 2001 From: Dimitri Koshkin Date: Tue, 1 Oct 2024 09:50:42 -0700 Subject: [PATCH 2/2] fix: extend the clusterctl timeout This should fix the race conditions seen when creating and upgrading CAPI providers. --- cmd/clusterctl/client/cluster/client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/clusterctl/client/cluster/client.go b/cmd/clusterctl/client/cluster/client.go index 9cc824fc1a5a..d6044215b3d6 100644 --- a/cmd/clusterctl/client/cluster/client.go +++ b/cmd/clusterctl/client/cluster/client.go @@ -242,13 +242,13 @@ func retryWithExponentialBackoff(ctx context.Context, opts wait.Backoff, operati // newWriteBackoff creates a new API Machinery backoff parameter set suitable for use with clusterctl write operations. func newWriteBackoff() wait.Backoff { - // Return a exponential backoff configuration which returns durations for a total time of ~40s. - // Example: 0, .5s, 1.2s, 2.3s, 4s, 6s, 10s, 16s, 24s, 37s + // Return a exponential backoff configuration which returns durations for a total time of ~6m. + // Example: 0, .5s, 1.2s, 2.3s, 4s, 6s, 10s, 16s, 24s, 37s, 56s, 84s, 126s, 190s // Jitter is added as a random fraction of the duration multiplied by the jitter factor. return wait.Backoff{ Duration: 500 * time.Millisecond, Factor: 1.5, - Steps: 10, + Steps: 14, Jitter: 0.4, } }