File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
tests/playbooks/roles/install-k3s/tasks Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1616
1717 set +x; source openrc admin admin > /dev/null; set -x
1818 openstack image show {{ image_name }} > /dev/null 2>&1
19+
1920 if [[ "$?" != "0" ]]; then
20- curl -sSL {{ image_url }} -o {{ image_name }}.img
21+ # retry ubuntu image download on failure,
22+ # e.g. "curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to cloud-images.ubuntu.com:443"
23+ tries=0
24+ until [ "$tries" -ge 5 ]; do
25+ curl -sSL {{ image_url }} -o {{ image_name }}.img && break
26+ echo "Error downloading an image"
27+ ((tries++))
28+ sleep 10
29+ done
2130 openstack image create {{ image_name }} --container-format bare --disk-format qcow2 --public --file {{ image_name }}.img
2231 fi
2332
You can’t perform that action at this time.
0 commit comments