Merge "Properly mirror the lxc container images as well"

This commit is contained in:
Zuul 2019-05-23 10:13:43 +00:00 committed by Gerrit Code Review
commit 5fca87512e
1 changed files with 10 additions and 24 deletions

View File

@ -25,13 +25,15 @@ fi
BASE="/afs/.openstack.org/mirror/opensuse"
MIRROR="rsync://mirror.us.leaseweb.net/opensuse"
OBS_MIRROR="rsync://provo-mirror.opensuse.org/opensuse/repositories"
OBS_REPOS=('Virtualization:/containers')
CLOUD_OBS_REPOS=('Cloud:/OpenStack:/Queens/openSUSE_Leap_42.3'
'Cloud:/OpenStack:/Queens/openSUSE_Leap_15.0'
'Cloud:/OpenStack:/Rocky/openSUSE_Leap_42.3'
'Cloud:/OpenStack:/Rocky/openSUSE_Leap_15.0'
'Cloud:/OpenStack:/Stein/openSUSE_Leap_15.0'
'Cloud:/OpenStack:/Master/openSUSE_Leap_15.0')
OBS_REPOS=('Virtualization:/containers/openSUSE_Leap_42.3'
'Virtualization:/containers/openSUSE_Leap_15.0'
'Virtualization:/containers:/images:/openSUSE-Leap-15.0'
'Cloud:/OpenStack:/Queens/openSUSE_Leap_42.3'
'Cloud:/OpenStack:/Queens/openSUSE_Leap_15.0'
'Cloud:/OpenStack:/Rocky/openSUSE_Leap_42.3'
'Cloud:/OpenStack:/Rocky/openSUSE_Leap_15.0'
'Cloud:/OpenStack:/Stein/openSUSE_Leap_15.0'
'Cloud:/OpenStack:/Master/openSUSE_Leap_15.0')
K5START="k5start -t -f /etc/opensuse.keytab service/opensuse-mirror -- $TIMEOUT"
# NOTE(hwoarang): Ensure old distros are not mirrored aymore
@ -71,26 +73,10 @@ for DISTVER in 42.3 15.0; do
--exclude="src/" \
--exclude="nosrc/" \
$MIRROR/$REPO/ $BASE/$REPO/
date --iso-8601=ns
for obs_repo in ${OBS_REPOS[@]}; do
REPO=repositories/${obs_repo}/openSUSE_Leap_${DISTVER}/
if ! [ -f $BASE/$REPO ]; then
$K5START mkdir -p $BASE/$REPO
fi
echo "Running rsync ${obs_repo} $DISTVER ..."
$K5START rsync -rlptDvz \
--delete --stats \
--delete-excluded \
--exclude="src/" \
--exclude="nosrc/" \
$OBS_MIRROR/$obs_repo/openSUSE_Leap_${DISTVER}/ $BASE/$REPO/
done
done
date --iso-8601=ns
for obs_repo in ${CLOUD_OBS_REPOS[@]}; do
for obs_repo in ${OBS_REPOS[@]}; do
REPO=repositories/${obs_repo}/
if ! [ -f $BASE/$REPO ]; then
$K5START mkdir -p $BASE/$REPO