From 428872075e35cf52513e13e995ca7a66d8e620b9 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 26 Jun 2019 23:29:20 +0000 Subject: [PATCH] Revert "Move openSUSE Tumbleweed into a caching mirror instead" This reverts commit b3ce1c52dc7ca455ffd94ea07d8a4fb1b6905fa8. It removed the AFS mirror at the same time it added the proxy, but jobs don't know to look for the proxy since it's on a totally different TCP port. Change-Id: I87cc03eb3322bd7b093dd6fe798aadb48f319805 --- .../files/mirror/opensuse-mirror-update.sh | 35 +++++++++++++++++-- .../templates/mirror.vhost.erb | 4 --- .../roles/mirror/templates/mirror.vhost.j2 | 5 --- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/modules/openstack_project/files/mirror/opensuse-mirror-update.sh b/modules/openstack_project/files/mirror/opensuse-mirror-update.sh index 21a88767ef..08851136e8 100644 --- a/modules/openstack_project/files/mirror/opensuse-mirror-update.sh +++ b/modules/openstack_project/files/mirror/opensuse-mirror-update.sh @@ -37,10 +37,9 @@ OBS_REPOS=('Virtualization:/containers/openSUSE_Leap_42.3' K5START="k5start -t -f /etc/opensuse.keytab service/opensuse-mirror -- $TIMEOUT" # NOTE(hwoarang): Ensure old distros are not mirrored aymore -for REPO in \ +for REPO in distribution/leap/42.2 update/leap/42.2 \ distribution/leap/15.0/jeos distribution/leap/15.0/live \ - repositories/Cloud:/OpenStack:/Master/openSUSE_Leap_42.3 \ - tumbleweed update/tumbleweed ; do + repositories/Cloud:/OpenStack:/Master/openSUSE_Leap_42.3 ; do if [ -d $BASE/$REPO ]; then $K5START rm -rf $BASE/$REPO fi @@ -91,6 +90,36 @@ for obs_repo in ${OBS_REPOS[@]}; do $OBS_MIRROR/$obs_repo/ $BASE/$REPO done +REPO=tumbleweed +if ! [ -f $BASE/$REPO ]; then + $K5START mkdir -p $BASE/$REPO/repo/oss/ +fi + +date --iso-8601=ns +echo "Running rsync distribution $REPO ..." +# TW is large and can have failures, be more resilient +$K5START rsync -rlptDvz \ + --delete --stats \ + --delete-excluded \ + --exclude="i586" \ + --ignore-errors \ + $MIRROR/$REPO/repo/oss/ $BASE/$REPO/repo/oss/ || : + +REPO=update/tumbleweed +if ! [ -f $BASE/$REPO ]; then + $K5START mkdir -p $BASE/$REPO +fi + +date --iso-8601=ns +echo "Running rsync distribution $REPO ..." +$K5START rsync -rlptDvz \ + --timeout=600 \ + --delete --stats \ + --delete-excluded \ + --exclude="i586" \ + --ignore-errors \ + $OBS_MIRROR/openSUSE:/Factory:/Update/standard/ $BASE/$REPO || : + date --iso-8601=ns | $K5START tee $BASE/timestamp.txt echo "rsync completed successfully, running vos release." k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME diff --git a/modules/openstack_project/templates/mirror.vhost.erb b/modules/openstack_project/templates/mirror.vhost.erb index 44d266f970..80f4acc03f 100644 --- a/modules/openstack_project/templates/mirror.vhost.erb +++ b/modules/openstack_project/templates/mirror.vhost.erb @@ -281,10 +281,6 @@ LogFormat "%h %l %u %t \"%r\" %>s %b %{cache-status}e \"%{Referer}i\" \"%{User-a ProxyPass "/copr-lxc2/" "https://copr-be.cloud.fedoraproject.org/results/thm/lxc2.0/" ttl=120 keepalive=On retry=0 ProxyPassReverse "/copr-lxc2/" "https://copr-be.cloud.fedoraproject.org/results/thm/lxc2.0/" - # openSUSE Tumbleweed - CacheEnable disk "/tumbleweed" - ProxyPass "/tumbleweed/" "https://download.opensuse.org/tumbleweed/repo/oss/" ttl=120 keepalive=On retry=0 - ProxyPassReverse "/tumbleweed/" "https://download.opensuse.org/tumbleweed/repo/oss/" # Docker registry v1 proxy. diff --git a/playbooks/roles/mirror/templates/mirror.vhost.j2 b/playbooks/roles/mirror/templates/mirror.vhost.j2 index 7beab4646b..68ce814309 100644 --- a/playbooks/roles/mirror/templates/mirror.vhost.j2 +++ b/playbooks/roles/mirror/templates/mirror.vhost.j2 @@ -287,11 +287,6 @@ LogFormat "%h %l %u %t \"%r\" %>s %b %{cache-status}e \"%{Referer}i\" \"%{User-a ProxyPass "/copr-lxc2/" "https://copr-be.cloud.fedoraproject.org/results/thm/lxc2.0/" ttl=120 keepalive=On retry=0 ProxyPassReverse "/copr-lxc2/" "https://copr-be.cloud.fedoraproject.org/results/thm/lxc2.0/" - # openSUSE Tumbleweed - CacheEnable disk "/tumbleweed" - ProxyPass "/tumbleweed/" "https://download.opensuse.org/tumbleweed/repo/oss/" ttl=120 keepalive=On retry=0 - ProxyPassReverse "/tumbleweed/" "https://download.opensuse.org/tumbleweed/repo/oss/" - # Docker registry v1 proxy.