Move openSUSE Tumbleweed into a caching mirror instead

Tumbleweed is only rarely used in the openStack CI, so mirroring it
fully is not worth the time/space overhead. a caching proxy
should be good enough. Add it to the directories to clean up
and remove the older entries because they will no longer be
matching.

Change-Id: I987da098cf4a7330cdec8da9ae3cfbff2f330bf8
This commit is contained in:
Dirk Mueller 2019-05-20 16:10:30 +02:00 committed by Ian Wienand
parent f671c38fa7
commit b3ce1c52dc
3 changed files with 12 additions and 32 deletions

View File

@ -37,9 +37,10 @@ OBS_REPOS=('Virtualization:/containers/openSUSE_Leap_42.3'
K5START="k5start -t -f /etc/opensuse.keytab service/opensuse-mirror -- $TIMEOUT" K5START="k5start -t -f /etc/opensuse.keytab service/opensuse-mirror -- $TIMEOUT"
# NOTE(hwoarang): Ensure old distros are not mirrored aymore # NOTE(hwoarang): Ensure old distros are not mirrored aymore
for REPO in distribution/leap/42.2 update/leap/42.2 \ for REPO in \
distribution/leap/15.0/jeos distribution/leap/15.0/live \ distribution/leap/15.0/jeos distribution/leap/15.0/live \
repositories/Cloud:/OpenStack:/Master/openSUSE_Leap_42.3 ; do repositories/Cloud:/OpenStack:/Master/openSUSE_Leap_42.3 \
tumbleweed update/tumbleweed ; do
if [ -d $BASE/$REPO ]; then if [ -d $BASE/$REPO ]; then
$K5START rm -rf $BASE/$REPO $K5START rm -rf $BASE/$REPO
fi fi
@ -90,36 +91,6 @@ for obs_repo in ${OBS_REPOS[@]}; do
$OBS_MIRROR/$obs_repo/ $BASE/$REPO $OBS_MIRROR/$obs_repo/ $BASE/$REPO
done 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 date --iso-8601=ns | $K5START tee $BASE/timestamp.txt
echo "rsync completed successfully, running vos release." echo "rsync completed successfully, running vos release."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME

View File

@ -281,6 +281,10 @@ 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 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/" 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/"
</VirtualHost> </VirtualHost>
# Docker registry v1 proxy. # Docker registry v1 proxy.

View File

@ -287,6 +287,11 @@ 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 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/" 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/"
</VirtualHost> </VirtualHost>
# Docker registry v1 proxy. # Docker registry v1 proxy.