Skip to content

Commit 2fd0d8e

Browse files
committed
Upgrade test add 2min grace period allow non-drain updates to complete
The logic now waits for 2min (normal rollout time for non-drain updates) before reporting error if the pool requires an update but nodes are not ready. Signed-off-by: Qi Wang <qiwan@redhat.com>
1 parent 3885a6b commit 2fd0d8e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/e2e/upgrade/upgrade.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,9 @@ func clusterUpgrade(f *framework.Framework, c configv1client.Interface, dc dynam
619619
}
620620

621621
var errMasterUpdating error
622+
var violationStartTime *time.Time
623+
const gracePeriod = 2 * time.Minute
624+
622625
if err := disruption.RecordJUnit(
623626
f,
624627
"[sig-mco] Machine config pools complete upgrade",
@@ -657,6 +660,15 @@ func clusterUpgrade(f *framework.Framework, c configv1client.Interface, dc dynam
657660

658661
// Invariant: when CVO reaches level, MCO is required to have rolled out control plane updates
659662
if p.GetName() == "master" && requiresUpdate && !allNodesReady && errMasterUpdating == nil {
663+
if violationStartTime == nil {
664+
now := time.Now()
665+
violationStartTime = &now
666+
framework.Logf("Invariant violation detected: master pool requires update but nodes not ready. Waiting up to %v for non-draining updates to complete", gracePeriod)
667+
return false, nil
668+
}
669+
if time.Since(*violationStartTime) <= gracePeriod {
670+
return false, nil
671+
}
660672
errMasterUpdating = fmt.Errorf("the %q pool should be updated before the CVO reports available at the new version", p.GetName())
661673
framework.Logf("Invariant violation detected: %s", errMasterUpdating)
662674
}

0 commit comments

Comments
 (0)