fix: retry transient registry pulls
Deploy Cluster / Terraform (push) Successful in 33s
Deploy Cluster / Ansible (push) Failing after 28m31s

This commit is contained in:
2026-05-02 02:42:58 +00:00
parent 0874553582
commit d78867e4d6
3 changed files with 21 additions and 9 deletions
@@ -6,13 +6,17 @@
exit 0
fi
for attempt in 1 2 3 4 5; do
if timeout 180s /usr/local/bin/ctr -n k8s.io images pull "{{ item }}"; then
echo "mtu=$(cat /sys/class/net/{{ ansible_default_ipv4.interface | default('eth0') }}/mtu 2>/dev/null || true)"
ip route get 1.1.1.1 || true
for attempt in 1 2 3 4 5 6 7 8 9 10; do
echo "pull attempt ${attempt}: {{ item }}"
if timeout 240s /usr/local/bin/ctr -n k8s.io images pull "{{ item }}"; then
echo "pulled image"
exit 0
fi
sleep 10
sleep 15
done
exit 1
+7 -3
View File
@@ -6,13 +6,17 @@
exit 0
fi
for attempt in 1 2 3; do
if timeout 120s /usr/local/bin/ctr -n k8s.io images pull "{{ item }}"; then
echo "mtu=$(cat /sys/class/net/{{ ansible_default_ipv4.interface | default('eth0') }}/mtu 2>/dev/null || true)"
ip route get 1.1.1.1 || true
for attempt in 1 2 3 4 5; do
echo "pull attempt ${attempt}: {{ item }}"
if timeout 180s /usr/local/bin/ctr -n k8s.io images pull "{{ item }}"; then
echo "pulled image"
exit 0
fi
sleep 10
sleep 15
done
exit 1
@@ -6,13 +6,17 @@
exit 0
fi
for attempt in 1 2 3 4 5; do
if timeout 180s /usr/local/bin/ctr -n k8s.io images pull "{{ item }}"; then
echo "mtu=$(cat /sys/class/net/{{ ansible_default_ipv4.interface | default('eth0') }}/mtu 2>/dev/null || true)"
ip route get 1.1.1.1 || true
for attempt in 1 2 3 4 5 6 7 8 9 10; do
echo "pull attempt ${attempt}: {{ item }}"
if timeout 240s /usr/local/bin/ctr -n k8s.io images pull "{{ item }}"; then
echo "pulled image"
exit 0
fi
sleep 10
sleep 15
done
exit 1