From 0606efe590887d17c653c664f3185580c3d5cfa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Tue, 6 Aug 2024 07:14:14 +0200 Subject: [PATCH] MirrorManager: update the move-to-archive command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- modules/howtos/pages/archive-old-fedora.adoc | 22 +++++++++++++------ modules/release_guide/pages/release_eol.adoc | 4 ++-- .../sysadmin_guide/pages/mirrormanager.adoc | 4 ++-- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/modules/howtos/pages/archive-old-fedora.adoc b/modules/howtos/pages/archive-old-fedora.adoc index 553f444..f91de23 100644 --- a/modules/howtos/pages/archive-old-fedora.adoc +++ b/modules/howtos/pages/archive-old-fedora.adoc @@ -45,7 +45,7 @@ copy a file. These need to be dealt with individually. + Another error which happens when I script things is that you find out that everything got copied into -/pub/archive/fedora/linux/releases/21/21 even though it shouldn't. +/pub/archive/fedora/linux/releases/21/21 even though it shouldn't. . If the target directory already exists, then we need to do a recursive rsync to update any changes in the trees since the previous copy. @@ -97,14 +97,22 @@ $ rsync -avSAXHP --delete 21/ /pub/archive/fedora-secondary/updates/testing/21/ . Announce to the mirror list this has been done and that in 2 weeks you will move the old trees to archives. -. In two weeks, log into mm-backend01 and run the archive script +. In two weeks, run the following playbook from batcave: + [source] ---- -$ sudo -i ssh root@mm-backend01.iad2.fedoraproject.org -$ sudo -u mirrormanager mm2_move-to-archive --originalCategory="Fedora Linux" --archiveCategory="Fedora Archive" --directoryRe='/21/Everything' +$ rbac-playbook -v /srv/web/infra/ansible/playbooks/manual/mirrormanager/move-to-archive.yml --extra-vars="product='Fedora' version='38'" ---- +. This will start a job named `move-to-archive-fedora-38` on Openshift. +The playbook will output two commands to view the job's logs and to cancel it if needed. +You can run those commands on os-control01 or on any host logged in to OpenShift. +Alternatively, you can follow the job's execution on the Openshift WebUI and cancel it from there. +The playbook will wait for the job to complete. + +. Note that the `Fedora Codecs` will not be archived, because we currently don't do that. +This category is explicitely excluded in the MirrorManager command itself. + . If there are problems, the postgres DB may have issues and so you need to get a DBA to update the backend to fix items. @@ -129,15 +137,15 @@ $ ln ../20/README . $ cd /pub/fedora-secondary/releases $ cd 21 -$ ls # make sure you have stuff here +$ ls # make sure you have stuff here $ rm -rf * $ ln ../20/README . $ cd ../../updates/21 -$ ls # make sure you have stuff here +$ ls # make sure you have stuff here $ rm -rf * $ ln ../20/README . $ cd ../testing/21 -$ ls # make sure you have stuff here +$ ls # make sure you have stuff here $ rm -rf * $ ln ../20/README . ---- diff --git a/modules/release_guide/pages/release_eol.adoc b/modules/release_guide/pages/release_eol.adoc index 266fbd3..a309374 100644 --- a/modules/release_guide/pages/release_eol.adoc +++ b/modules/release_guide/pages/release_eol.adoc @@ -191,12 +191,12 @@ $ rsync -avAXSHP {old_release}/ /pub/archive/fedora-secondary/updates/testing/{o ____ . Announce to the mirror list this has been done and that in 2 weeks you will move the old trees to archives. -. In two weeks, log into mm-backend01 and run the archive script +. In two weeks, run the following playbook from batcave: + ____ [source,subs="attributes+"] .... -$ sudo -u mirrormanager mm2_move-to-archive --originalCategory="Fedora Linux" --archiveCategory="Fedora Archive" --directoryRe='/{old_release}/Everything' +$ rbac-playbook -v /srv/web/infra/ansible/playbooks/manual/mirrormanager/move-to-archive.yml --extra-vars="product='Fedora' version='{old_release}'" .... ____ . If there are problems, the postgres DB may have issues and so you need diff --git a/modules/sysadmin_guide/pages/mirrormanager.adoc b/modules/sysadmin_guide/pages/mirrormanager.adoc index 2717571..803bf59 100644 --- a/modules/sysadmin_guide/pages/mirrormanager.adoc +++ b/modules/sysadmin_guide/pages/mirrormanager.adoc @@ -74,11 +74,11 @@ contact the Mirror Wrangler. Once the files of an EOL release have been copied to the archive directory tree and enough mirrors have picked the files up at the -archive location there is also a script to adapt those paths in +archive location there is also a playbook to adapt those paths in MirrorManager's database: .... -sudo -u mirrormanager mm2_move-to-archive --originalCategory='Fedora EPEL' --directoryRe='/4/' +$ rbac-playbook -v /srv/web/infra/ansible/playbooks/manual/mirrormanager/move-to-archive.yml --extra-vars="product='EPEL' version='7'" .... == mirrorlist containers and mirrorlist servers