Skip to content

Commit 30054b3

Browse files
bryan-coxclaude
andcommitted
test(e2e): OCPBUGS-98387: align Available condition timeout with waitTimeout
Increase the HostedCluster Available condition timeout from 30m to 45m to match the overall waitTimeout already used for version rollout. Azure VM-to-node registration regularly exceeds 30 minutes when 6 clusters are created in parallel, causing premature timeouts in the self-managed e2e presubmit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d7b1ccd commit 30054b3

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

cmd/cluster/core/create.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,7 @@ func (opts *RawCreateOptions) validateClusterExistenceWithClient(ctx context.Con
824824
if err := c.Get(ctx, crclient.ObjectKeyFromObject(cluster), cluster); err == nil {
825825
return fmt.Errorf("hostedcluster %s already exists", crclient.ObjectKeyFromObject(cluster))
826826
} else if !apierrors.IsNotFound(err) {
827+
opts.Log.Error(err, "error checking hostedcluster existence", "namespace", opts.Namespace, "name", opts.Name)
827828
return err
828829
}
829830
return nil

cmd/cluster/core/create_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,10 +1844,7 @@ func TestValidateClusterExistence(t *testing.T) {
18441844
},
18451845
client: &timeoutThenExistsClient{
18461846
callsBeforeTerminal: 2,
1847-
existingCluster: &hyperv1.HostedCluster{
1848-
ObjectMeta: metav1.ObjectMeta{Namespace: "test-ns", Name: "test-cluster"},
1849-
},
1850-
scheme: scheme,
1847+
scheme: scheme,
18511848
},
18521849
expectError: true,
18531850
errorMsg: "already exists",
@@ -1912,7 +1909,6 @@ func (c *nonTransientErrorClient) Scheme() *runtime.Scheme {
19121909
type timeoutThenExistsClient struct {
19131910
crclient.Client
19141911
callsBeforeTerminal int
1915-
existingCluster *hyperv1.HostedCluster
19161912
calls int
19171913
scheme *runtime.Scheme
19181914
}

test/e2e/v2/cmd/create-guests/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ func run(ctx context.Context, cfg envConfig) error {
179179

180180
// Phase 3: Watch for Available condition on all clusters.
181181
log.Println("Phase 3: Waiting for all clusters to become Available")
182-
availableErrors := waitForClustersAvailable(ctx, mgmtClient, cfg.namespace, named, 30*time.Minute)
182+
// Use cfg.waitTimeout (45m) to match the version rollout timeout at line 352.
183+
availableErrors := waitForClustersAvailable(ctx, mgmtClient, cfg.namespace, named, cfg.waitTimeout)
183184
for _, ns := range named {
184185
if err := availableErrors[ns.Variant]; err != nil {
185186
log.Printf("ERROR: cluster %s (%s) did not become Available: %v", ns.name, ns.Variant, err)

0 commit comments

Comments
 (0)