Merge "mirror-update: make jobs interactive by default"

This commit is contained in:
Zuul 2023-01-17 19:27:20 +00:00 committed by Gerrit Code Review
commit 387302645a
9 changed files with 36 additions and 24 deletions

View File

@ -528,7 +528,7 @@ our mirror update cron jobs, manually perform the first mirror update:
``timeout`` with shorter periods than may be required for the ``timeout`` with shorter periods than may be required for the
initial full sync. e.g. for ``reprepro`` mirrors initial full sync. e.g. for ``reprepro`` mirrors
NO_TIMEOUT=1 /usr/local/bin/reprepro-mirror-update /etc/reprepro/ubuntu mirror.ubuntu /usr/local/bin/reprepro-mirror-update /etc/reprepro/ubuntu mirror.ubuntu
* Log into ``afs01.dfw.openstack.org`` and run ``screen``. Within * Log into ``afs01.dfw.openstack.org`` and run ``screen``. Within
that session, periodically during the sync, and once again after it that session, periodically during the sync, and once again after it

View File

@ -17,11 +17,13 @@ source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1 MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then # Runs with timeout under cron
echo "Running interactively" if [[ ${UNDER_CRON:-0} -eq 0 ]]; then
echo_ts "Running interactively"
TIMEOUT="" TIMEOUT=""
set -x
else else
TIMEOUT="timeout -k 2m 30m" TIMEOUT="timeout -k 2m 90m"
fi fi
_DRY_RUN='' _DRY_RUN=''

View File

@ -17,11 +17,13 @@ source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1 MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then # Runs with timeout under cron
echo "Running interactively" if [[ ${UNDER_CRON:-0} -eq 0 ]]; then
echo_ts "Running interactively"
TIMEOUT="" TIMEOUT=""
set -x
else else
TIMEOUT="timeout -k 2m 30m" TIMEOUT="timeout -k 2m 90m"
fi fi
_DRY_RUN='' _DRY_RUN=''

View File

@ -17,11 +17,13 @@ source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1 MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then # Runs with timeout under cron
echo "Running interactively" if [[ ${UNDER_CRON:-0} -eq 0 ]]; then
echo_ts "Running interactively"
TIMEOUT="" TIMEOUT=""
set -x
else else
TIMEOUT="timeout -k 2m 30m" TIMEOUT="timeout -k 2m 90m"
fi fi
BASE="/afs/.openstack.org/mirror/epel" BASE="/afs/.openstack.org/mirror/epel"

View File

@ -17,12 +17,13 @@ source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1 MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then # Runs with timeout under cron
if [[ ${UNDER_CRON:-0} -eq 0 ]]; then
echo_ts "Running interactively" echo_ts "Running interactively"
set -x
TIMEOUT="" TIMEOUT=""
set -x
else else
TIMEOUT="timeout -k 2m 30m" TIMEOUT="timeout -k 2m 90m"
fi fi
BASE="/afs/.openstack.org/mirror/fedora" BASE="/afs/.openstack.org/mirror/fedora"

View File

@ -20,11 +20,13 @@ source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1 MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then # Runs with timeout under cron
if [[ ${UNDER_CRON:-0} -eq 0 ]]; then
echo_ts "Running interactively" echo_ts "Running interactively"
TIMEOUT="" TIMEOUT=""
set -x
else else
TIMEOUT="timeout -k 2m 30m" TIMEOUT="timeout -k 2m 90m"
fi fi
BASE="/afs/.openstack.org/mirror/openeuler" BASE="/afs/.openstack.org/mirror/openeuler"

View File

@ -17,11 +17,13 @@ source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1 MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then # Runs with timeout under cron
echo "Running interactively" if [[ ${UNDER_CRON:-0} -eq 0 ]]; then
echo_ts "Running interactively"
TIMEOUT="" TIMEOUT=""
set -x
else else
TIMEOUT="timeout -k 2m 30m" TIMEOUT="timeout -k 2m 90m"
fi fi
BASE="/afs/.openstack.org/mirror/opensuse" BASE="/afs/.openstack.org/mirror/opensuse"

View File

@ -17,11 +17,13 @@ source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1 MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then # Runs with timeout under cron
echo "Running interactively" if [[ ${UNDER_CRON:-0} -eq 0 ]]; then
echo_ts "Running interactively"
TIMEOUT="" TIMEOUT=""
set -x
else else
TIMEOUT="timeout -k 2m 30m" TIMEOUT="timeout -k 2m 90m"
fi fi
BASE="/afs/.openstack.org/mirror/yum-puppetlabs" BASE="/afs/.openstack.org/mirror/yum-puppetlabs"

View File

@ -16,9 +16,8 @@
source /usr/share/mirror-update/functions.sh source /usr/share/mirror-update/functions.sh
# For initial clones, and debugging, set this for more verbose output # Runs with timeout under cron
# that doesn't time out. if [[ ${UNDER_CRON:-0} -eq 0 ]]; then
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then
echo_ts "Running interactively" echo_ts "Running interactively"
TIMEOUT="" TIMEOUT=""
set -x set -x