Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8f7a696

Browse files
committedMar 28, 2025·
Wait for worker MCP to start updating only if there are Nodes
1 parent ee1edd3 commit 8f7a696

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎ci-operator/step-registry/network/mtu-migration/network-mtu-migration-commands.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ wait_for_mcp() {
6464
timeout=${1}
6565
# Wait until MCO starts applying new machine config to nodes
6666
log "Waiting for all MachineConfigPools to start updating..."
67-
time oc wait mcp --all --for='condition=UPDATING=True' --timeout=300s &>/dev/null
67+
# The worker MachineConfigPool gets updated immediately if there are no Nodes.
68+
if [[ $(oc get nodes -l node-role.kubernetes.io/worker --no-headers | wc -l) -ne 0 ]]; then
69+
time oc wait mcp worker --for='condition=UPDATING=True' --timeout=300s &>/dev/null
70+
fi
71+
time oc wait mcp master --for='condition=UPDATING=True' --timeout=300s &>/dev/null
6872

6973
log "Waiting for all MachineConfigPools to finish updating..."
7074
timeout "${timeout}" bash <<EOT

0 commit comments

Comments
 (0)
Please sign in to comment.