diff --git a/roles/mirrormanager/mirrorlist_proxy/files/restart-mirrorlist-containers b/roles/mirrormanager/mirrorlist_proxy/files/restart-mirrorlist-containers index 7b5491409a..36bd4936fe 100644 --- a/roles/mirrormanager/mirrorlist_proxy/files/restart-mirrorlist-containers +++ b/roles/mirrormanager/mirrorlist_proxy/files/restart-mirrorlist-containers @@ -4,6 +4,13 @@ # This job handles hourly restarting mirrorlist container(s) and making sure all is well. # +## +## Docker ports for mirrors +mirrorlist1="http://localhost:18081/metalink?repo=rawhide&arch=x86_64" +mirrorlist2="http://localhost:18081/metalink?repo=rawhide&arch=x86_64" + +## + # Initial expected state is mirrorlist1 running, mirrorlist2 running and new pkl if [ ! -f /srv/mirrorlist/data/mirrorlist2/global_netblocks.txt ]; @@ -27,10 +34,11 @@ if [ `systemctl show mirrorlist1 -p ActiveState` != 'ActiveState=active' ]; then fi # start mirrorlist2 (old pkl and see that it's processing ok) + systemctl start mirrorlist2 -sleep 40 -curl -q -H mirrors.fedoraproject.org "http://localhost:18082/metalink?repo=rawhide&arch=x86_64" -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 | grep "sha512" >/dev/null +sleep 5 +curl -q -H mirrors.fedoraproject.org ${mirrorlist2} -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 | grep "sha512" >/dev/null if [ $? != 0 ]; then echo "ERROR: mirrorlist2 did not start correctly" exit 1 @@ -47,7 +55,7 @@ sleep 1 systemctl restart mirrorlist1 sleep 5 -curl -q -H mirrors.fedoraproject.org "http://localhost:18082/metalink?repo=rawhide&arch=x86_64" -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 | grep "sha512" >/dev/null +curl -q -H mirrors.fedoraproject.org ${mirrorlist1} -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 | grep "sha512" >/dev/null if [ $? != 0 ]; then echo "ERROR: mirrorlist1 did not restart correctly" exit 1 @@ -70,7 +78,7 @@ sleep 1 systemctl restart mirrorlist2 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 +curl -q -H mirrors.fedoraproject.org ${mirrorlist2} -o/dev/null -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 if [ $? != 0 ]; then echo "ERROR: mirrorlist2 did not restart correctly" exit 1