fix: parallelize Rancher child image warmup
Deploy Cluster / Terraform (push) Successful in 35s
Deploy Cluster / Ansible (push) Failing after 23m46s

This commit is contained in:
2026-04-26 00:02:12 +00:00
parent 4796606432
commit 195e9bce25
+15 -2
View File
@@ -637,11 +637,25 @@ jobs:
pull_image_on_all_nodes() { pull_image_on_all_nodes() {
local image="$1" local image="$1"
local ips local ips
local pids=""
local failed=false
ips="$(python3 -c 'import json; outputs=json.load(open("outputs/terraform_outputs.json")); print(" ".join(outputs["control_plane_ips"]["value"] + outputs["worker_ips"]["value"]))')" ips="$(python3 -c 'import json; outputs=json.load(open("outputs/terraform_outputs.json")); print(" ".join(outputs["control_plane_ips"]["value"] + outputs["worker_ips"]["value"]))')"
for ip in ${ips}; do for ip in ${ips}; do
pull_image_on_node "${image}" "${ip}" 45 10 pull_image_on_node "${image}" "${ip}" 30 10 &
pids="${pids} $!"
done done
for pid in ${pids}; do
if ! wait "${pid}"; then
failed=true
fi
done
if [ "${failed}" = "true" ]; then
echo "Failed to pre-pull required Rancher image ${image} on one or more nodes" >&2
exit 1
fi
} }
echo "Waiting for Rancher..." echo "Waiting for Rancher..."
@@ -650,7 +664,6 @@ jobs:
wait_for_resource flux-system helmrelease.helm.toolkit.fluxcd.io/rancher 600 wait_for_resource flux-system helmrelease.helm.toolkit.fluxcd.io/rancher 600
reconcile_helmrelease rancher reconcile_helmrelease rancher
wait_for_helmchart_ready flux-system-rancher rancher 180s 5 wait_for_helmchart_ready flux-system-rancher rancher 180s 5
pull_image_on_all_nodes rancher/rancher:v2.13.3
pull_image_on_all_nodes rancher/shell:v0.6.2 pull_image_on_all_nodes rancher/shell:v0.6.2
pull_image_on_all_nodes rancher/rancher-webhook:v0.9.3 pull_image_on_all_nodes rancher/rancher-webhook:v0.9.3
pull_image_on_all_nodes rancher/system-upgrade-controller:v0.17.0 pull_image_on_all_nodes rancher/system-upgrade-controller:v0.17.0