diff --git a/roles/mirrormanager/backend/files/backend.cron b/roles/mirrormanager/backend/files/backend.cron index e973ba24c4..46869b9944 100644 --- a/roles/mirrormanager/backend/files/backend.cron +++ b/roles/mirrormanager/backend/files/backend.cron @@ -1,8 +1,10 @@ MAILTO=root -# Refresh the mirrorlist cache at the top of the hour and sync it to the -# mirrorlist servers -55 * * * * mirrormanager /usr/bin/mm2_update-mirrorlist-server && /usr/local/bin/sync_pkl_to_mirrorlists.sh +# Refresh the mirrorlist cache once every hour. +# This can take up to 35 minutes. The mirrorlist servers +# are restarted :15 after the full hour. Starting at :30 +# should give us enough time. +30 * * * * mirrormanager /usr/bin/mm2_update-mirrorlist-server -p && /usr/local/bin/sync_pkl_to_mirrorlists.sh # update master directory # logs sent to /var/log/mirrormanager/umdl.log by default diff --git a/roles/mirrormanager/backend/templates/sync_pkl_to_mirrorlists.sh b/roles/mirrormanager/backend/templates/sync_pkl_to_mirrorlists.sh index c05a62b30a..8428695d29 100644 --- a/roles/mirrormanager/backend/templates/sync_pkl_to_mirrorlists.sh +++ b/roles/mirrormanager/backend/templates/sync_pkl_to_mirrorlists.sh @@ -5,5 +5,5 @@ MIRRORLIST_PROXY="{% for host in groups['mirrorlist_proxies'] %} {{ host }} {% endfor %}" for s in ${MIRRORLIST_PROXY}; do - rsync -az --delete-delay --delay-updates --delete /var/lib/mirrormanager/{*pkl,*txt} ${s}:/srv/mirrorlist/data/mirrorlist1/ + rsync -az --delete-delay --delay-updates --delete /var/lib/mirrormanager/{*pkl,*txt,*proto} ${s}:/srv/mirrorlist/data/mirrorlist1/ done diff --git a/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml b/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml index 669554d0e3..63596ee4ae 100644 --- a/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml +++ b/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml @@ -59,7 +59,7 @@ - /var/log/mirrormanager tags: - mirrorlist_proxy - when: env == 'staging' + when: env == 'staging' or inventory_hostname.startswith('proxy14') - name: set logrotate_read_inside_containers so logrotate works seboolean: name=logrotate_read_inside_containers state=yes persistent=yes diff --git a/roles/mirrormanager/mirrorlist_proxy/templates/mirrorlist.service.j2 b/roles/mirrormanager/mirrorlist_proxy/templates/mirrorlist.service.j2 index b0ce4ded52..2d26807c80 100644 --- a/roles/mirrormanager/mirrorlist_proxy/templates/mirrorlist.service.j2 +++ b/roles/mirrormanager/mirrorlist_proxy/templates/mirrorlist.service.j2 @@ -2,12 +2,12 @@ Description=Mirrorlist Container {{ item }} [Service] -{% if env == "staging" %} +{% if env == "staging" or inventory_hostname == "proxy14.fedoraproject.org" %} User=mirrormanager {% endif %} ExecStartPre=-/usr/bin/podman stop %n ExecStartPre=-/usr/bin/podman rm %n --force -{% if env == "staging" %} +{% if env == "staging" or inventory_hostname == "proxy14.fedoraproject.org" %} ExecStart=/usr/bin/podman run \ --rm=true \ --net=host --userns=keep-id \