Skip to content

Commit 9b86c21

Browse files
committed
Wait for worker MCP to start updating only if there are machines
1 parent ee1edd3 commit 9b86c21

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 machines.
68+
if [[ $(oc get mcp worker -ojsonpath='{.status.machineCount}') -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)