From 4ed4488808f8b305c161e5945d98a5a8e9292fc0 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 31 Jan 2022 13:44:02 -0800 Subject: [PATCH] Stop mirroring centos-8 This updates our rsync mirroring script for centos to stop mirroring centos-8. We also delete the 8/ dir if it exists. Depends-On: https://review.opendev.org/c/openstack/project-config/+/827184 Change-Id: Ida8605b3b2a3cd9ff358745e12714b27dbd9c59b --- .../mirror-update/files/centos-mirror-update | 28 ++++++------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/playbooks/roles/mirror-update/files/centos-mirror-update b/playbooks/roles/mirror-update/files/centos-mirror-update index eca6e26bed..73325b9d77 100755 --- a/playbooks/roles/mirror-update/files/centos-mirror-update +++ b/playbooks/roles/mirror-update/files/centos-mirror-update @@ -35,6 +35,15 @@ RSYNC="rsync ${_DRY_RUN} -rltvz" BASE="/afs/.openstack.org/mirror/centos" K5START="k5start -t -f /etc/centos.keytab service/centos-mirror -- $TIMEOUT" +if [[ ${DRY_RUN:-0} -ne 1 ]]; then + # Cleanup old repos + for REPO in 8 ; do + if [ -d $BASE/$REPO/ ]; then + $K5START rm -rf $BASE/$REPO/ + fi + done +fi + # # -- Centos 8-stream -- # @@ -54,25 +63,6 @@ $K5START ${RSYNC} \ --exclude=".*" \ $MIRROR $BASE/8-stream -# -# -- Centos 8 -- -# - -MIRROR=rsync://mirror.dal10.us.leaseweb.net/centos/8/ # somewhere in TX - -if ! [ -f $BASE/8 ]; then - $K5START mkdir -p $BASE/8 -fi -date --iso-8601=ns -echo "Running Centos 8 rsync..." -$K5START ${RSYNC} \ - --delete \ - --delete-excluded \ - --exclude="isos" \ - --exclude="ppc64le*" \ - --exclude=".*" \ - $MIRROR $BASE/8 - # # -- Centos 7 -- #