Commit 79aaded
[multiple] Fix MCO stuck-uncordon deadlock
MachineConfigs applied during devscripts install trigger an MCO update
cycle that runs asynchronously after the cluster becomes reachable. On
compact 3-master clusters the MCO controller can enter a permanent
deadlock: all nodes reboot, apply the new config, and report
state=Done with desiredDrain=lastAppliedDrain=uncordon-*, but the
controller never issues the final kubectl uncordon. This leaves all
nodes SchedulingDisabled indefinitely, causing every subsequent cluster
operator to degrade and the deployment to time out.
Add a retry loop in wait_for_cluster.yml (run as part of the
openshift_adm 'stable' operation after devscripts post-install) that:
- Polls MachineConfigPool status every 30 s for up to 30 minutes.
- If a pool is updating normally (nodes being drained/rebooted in
sequence) it waits without interrupting the MCO mid-cycle.
- If it detects the stuck state (updatedMachineCount == machineCount
but readyMachineCount == 0) it runs 'oc adm uncordon' on all nodes
to break the deadlock, then continues polling.
- Only proceeds to 'oc adm wait-for-stable-cluster' once all pools
report Updated=True.
Signed-off-by: Ade Lee <alee@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>1 parent e15b394 commit 79aaded
1 file changed
Lines changed: 67 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
53 | 120 | | |
54 | 121 | | |
55 | 122 | | |
| |||
0 commit comments