It's been months since we announced a need for caretakers of OpenEuler images in https://lists.opendev.org/archives/list/service-discuss@lists.opendev.org/thread/ZLZ7OUFAOAZ7OS2PO2MHGJJKOBYVWB3G to no avail, and image builds were paused for many months before that due to being broken by mirror updates last year. Now we're months past the switch off Nodepool and no longer have any OpenEuler images to boot anyway. A followup change will clean up the related support infrastructure and delete cronjobs and keytabs from the server. Change-Id: I63eaccb4cd7fb46f2df0ea68998d1a84fd1e95b2
48 lines
1.3 KiB
Bash
48 lines
1.3 KiB
Bash
#!/bin/bash -xe
|
|
# Copyright 2021 Linaro Limited.
|
|
# Copyright 2016 Red Hat, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
# This references CentOS 7 mirroring part of centos-mirror-update.
|
|
|
|
source /usr/share/mirror-update/functions.sh
|
|
|
|
MIRROR_VOLUME=$1
|
|
|
|
# Runs with timeout under cron
|
|
if [[ ${UNDER_CRON:-0} -eq 0 ]]; then
|
|
echo_ts "Running interactively"
|
|
TIMEOUT=""
|
|
set -x
|
|
else
|
|
TIMEOUT="timeout -k 2m 90m"
|
|
fi
|
|
|
|
BASE="/afs/.openstack.org/mirror/openeuler"
|
|
K5START="k5start -t -f /etc/openeuler.keytab service/openeuler-mirror -- $TIMEOUT"
|
|
|
|
# Cleanup old repos
|
|
for REPO in openEuler-24.03-LTS ; do
|
|
if [ -d $BASE/$REPO/ ]; then
|
|
$K5START rm -rf $BASE/$REPO/
|
|
fi
|
|
done
|
|
|
|
date --iso-8601=ns | $K5START tee $BASE/timestamp.txt
|
|
echo_ts "rsync completed successfully, running vos release."
|
|
vos_release $MIRROR_VOLUME
|
|
|
|
date --iso-8601=ns
|
|
echo_ts "Done."
|