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 16
16
17
17
set +x; source openrc admin admin > /dev/null; set -x
18
18
openstack image show {{ image_name }} > /dev/null 2>&1
19
+
19
20
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
21
30
openstack image create {{ image_name }} --container-format bare --disk-format qcow2 --public --file {{ image_name }}.img
22
31
fi
23
32
You can’t perform that action at this time.
0 commit comments