From 41510098f9e3aad53209ef0842c1cabe9954d7ef Mon Sep 17 00:00:00 2001 From: Dimitri Koshkin Date: Tue, 1 Oct 2024 15:53:10 -0700 Subject: [PATCH] :bug: increase the timeout when creating and upgrading CAPI controllers (#27) * 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. * 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 +++--- exp/runtime/internal/controllers/warmup.go | 2 +- 2 files changed, 4 insertions(+), 4 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, } } 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 )