From 084801fc5580f4581d3c91fe472d70a2a0c1726b Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Mon, 15 Jan 2018 22:23:57 +0000 Subject: [PATCH] Rather than hard sleep 45, use curl retry Signed-off-by: Patrick Uiterwijk --- .../mirrorlist_proxy/files/restart-mirrorlist-containers | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/mirrormanager/mirrorlist_proxy/files/restart-mirrorlist-containers b/roles/mirrormanager/mirrorlist_proxy/files/restart-mirrorlist-containers index a8438d9067..fdf5385412 100644 --- a/roles/mirrormanager/mirrorlist_proxy/files/restart-mirrorlist-containers +++ b/roles/mirrormanager/mirrorlist_proxy/files/restart-mirrorlist-containers @@ -30,8 +30,8 @@ fi systemctl start mirrorlist2 echo "enable server mirror-lists/mirrorlist-local2" | nc -U /var/run/haproxy-admin >& /dev/null -sleep 45 -curl -q -H mirrors.fedoraproject.org "http://localhost:18082/metalink?repo=rawhide&arch=x86_64" -o/dev/null -s -f +sleep 5 +curl -q -H mirrors.fedoraproject.org "http://localhost:18082/metalink?repo=rawhide&arch=x86_64" -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 if [ $? != 0 ]; then echo "ERROR: mirrorlist2 did not start correctly" exit 1 @@ -46,8 +46,8 @@ systemctl restart mirrorlist1 sleep 1 echo "enable server mirror-lists/mirrorlist-local1" | nc -U /var/run/haproxy-admin >& /dev/null -sleep 45 -curl -q -H mirrors.fedoraproject.org "http://localhost:18081/metalink?repo=rawhide&arch=x86_64" -o/dev/null -s -f +sleep 5 +curl -q -H mirrors.fedoraproject.org "http://localhost:18081/metalink?repo=rawhide&arch=x86_64" -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 if [ $? != 0 ]; then echo "ERROR: mirrorlist1 did not restart correctly" exit 1