From 51b6478849ccbb34eadb576562959d3b26a265ce Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 29 Feb 2024 10:32:20 -0800 Subject: [PATCH] Update reprepro cleanup docs to cover dists/ and lists/ cleanup This includes a few extra steps that are needed to more fully cleanup reprepro mirrors when we drop distro releases from reprepro. Without this we leave some vestiges of old releases behind which can be confusing in the future when we think we have already cleaned this stuff up. Change-Id: I15032314c39279999fbd6be74e9d73b76843399c --- doc/source/reprepro.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/source/reprepro.rst b/doc/source/reprepro.rst index 20479a7341..6be76e1193 100644 --- a/doc/source/reprepro.rst +++ b/doc/source/reprepro.rst @@ -115,9 +115,27 @@ like:: # In this removal situation, we should clear out the files now # This can take a while depending on the size of what is removed $ ${REPREPRO} --nokeepunreferencedfiles deleteunreferenced + # Perform an intermediate release as this may take some time. # The ssh wrapper is the easiest way to release the volume $ source /usr/share/mirror-update/functions.sh $ vos_release + # Next we need to manually clear out some leftover lists/ and dists/ + # content. Using your openafs account you want to rm the old distro + # release dist/ dir and lists/ files. + # After kinit and aklog (note no sudo): + $ rm -rf /afs/.openstack.org/mirror//dists/ + $ rm /afs/.openstack.org/mirror//lists/__lastseen \ + /afs/.openstack.org/mirror//lists/*_Release \ + /afs/.openstack.org/mirror//lists/*_Release.gpg \ + /afs/.openstack.org/mirror//lists/*_*_Packages + # The total number of files may vary from distro release to release + # depending on the number of architectures mirrored. + # Finally rerun the normal reprepro sync for the distro in order to + # ensure this still functions and we haven't deleted too much content. + # This will also perform a vos release. + $ reprepro-mirror-update /etc/reprepro/ >> /var/log/reprepro/ 2>&1 + # You can get the reprepro-mirror-update command from crontab -l. + # Just drop the flock prefix as we already hold the lock. $ exit Advanced Recovery Techniques