try and run both docker mirrorlist containers most of the time, see if it helps with heavily loaded mirrorlists
This commit is contained in:
parent
1ab575069f
commit
b8fab4e7c2
1 changed files with 10 additions and 5 deletions
|
@ -4,7 +4,7 @@
|
|||
# This job handles hourly restarting mirrorlist container(s) and making sure all is well.
|
||||
#
|
||||
|
||||
# Initial expected state is mirrorlist1 running, mirrorlist2 not running and new pkl
|
||||
# Initial expected state is mirrorlist1 running, mirrorlist2 running and new pkl
|
||||
|
||||
if [ ! -f /srv/mirrorlist/data/mirrorlist2/global_netblocks.txt ];
|
||||
then
|
||||
|
@ -60,9 +60,14 @@ cp -a /srv/mirrorlist/data/mirrorlist1/* /srv/mirrorlist/data/mirrorlist2/
|
|||
echo "disable server mirror-lists-backend/mirrorlist-local2" | nc -U /var/run/haproxy-admin >& /dev/null
|
||||
sleep 1
|
||||
|
||||
# stop mirrorlist2
|
||||
systemctl stop mirrorlist2
|
||||
# restart mirrorlist2
|
||||
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
|
||||
if [ $? != 0 ]; then
|
||||
echo "ERROR: mirrorlist2 did not restart correctly"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Now that it's stopped, we can re-enable it. That makes sure that if anything went wrong, we
|
||||
# still have it enabled
|
||||
echo "enable server mirror-lists-backend/mirrorlist-local2" | nc -U /var/run/haproxy-admin >& /dev/null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue