diff --git a/doc/source/afs.rst b/doc/source/afs.rst index 27a1a8acbd..81a402d5cf 100644 --- a/doc/source/afs.rst +++ b/doc/source/afs.rst @@ -380,7 +380,9 @@ our mirror update cron jobs, manually perform the first mirror update: If using one of the mirror update scripts (from ``/usr/local/bin``) be aware that they generally run the update process under ``timeout`` with shorter periods than may be required for the - initial full sync. + initial full sync. e.g. for ``reprepro`` mirrors + + NO_TIMEOUT=1 /usr/local/bin/reprepro-mirror-update /etc/reprepro/ubuntu mirror.ubuntu * Log into ``afs01.dfw.openstack.org`` and run ``screen``. Within that session, periodically during the sync, and once again after it diff --git a/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh b/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh index 35956ffc48..dc61424419 100644 --- a/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh +++ b/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh @@ -16,12 +16,22 @@ set -e +# For initial clones, and debugging, set this for more verbose output +# that doesn't time out. +if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then + echo "Running interactively" + TIMEOUT="" + set -x +else + TIMEOUT="timeout -k 2m 90m" +fi + REPREPRO_CONFIG=$1 MIRROR_VOLUME=$2 BASE=`cat ${REPREPRO_CONFIG}/options | grep base | cut -d' ' -f2` UNREF_FILE=/var/run/reprepro/${MIRROR_VOLUME}.unreferenced-files -K5START="k5start -t -f /etc/reprepro.keytab service/reprepro -- timeout -k 2m 90m" +K5START="k5start -t -f /etc/reprepro.keytab service/reprepro -- ${TIMEOUT} " REPREPRO="$K5START reprepro --confdir $REPREPRO_CONFIG" date --iso-8601=ns