After a successful test of the new mirrorlist server code in staging, this is the next step. Try to make it work in production on one of the proxies. As discussed on the mailing list we are trying the new setup with proxy14. All the conditionals have been updated to be 'staging or proxy14' and the mirrorlist data generation has been enhanced to also write out the new protobuf based format on the backend system. At the same time this moves the pickle/protobuf generation from :55 to :30 as this generation takes much longer than it used to be and the mirrorlist server restarted at :15 was never using the new data during the last few months. Signed-off-by: Adrian Reber <adrian@xxxxxxxx> --- roles/mirrormanager/backend/files/backend.cron | 8 +++++--- .../backend/templates/sync_pkl_to_mirrorlists.sh | 2 +- roles/mirrormanager/mirrorlist_proxy/tasks/main.yml | 2 +- .../mirrorlist_proxy/templates/mirrorlist.service.j2 | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/roles/mirrormanager/backend/files/backend.cron b/roles/mirrormanager/backend/files/backend.cron index e973ba24c..46869b994 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 c05a62b30..8428695d2 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 669554d0e..63596ee4a 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 b0ce4ded5..2d26807c8 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 \ -- 2.23.0 _______________________________________________ infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx