From 22f0ef1288cab21d04b3eb511fc047b781ff92e3 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Sun, 2 Apr 2017 12:48:52 -0400 Subject: [PATCH] Add timestamp.txt to reprepro mirrors This allows users a quick way to see when the mirror was last released. If not current, they can notify openstack-infra about a potential failure. Change-Id: I052baaf7e14200666895c2cf90d1d0126cfc33bd Signed-off-by: Paul Belanger --- .../files/reprepro/reprepro-mirror-update.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh b/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh index a9fd7c094e..2a974f5091 100644 --- a/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh +++ b/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh @@ -18,9 +18,11 @@ set -e 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 -REPREPRO="k5start -t -f /etc/reprepro.keytab service/reprepro -- timeout -k 2m 30m reprepro --confdir $REPREPRO_CONFIG" +K5START="k5start -t -f /etc/reprepro.keytab service/reprepro -- timeout -k 2m 30m" +REPREPRO="$K5START reprepro --confdir $REPREPRO_CONFIG" date --iso-8601=ns echo "Obtaining reprepro tokens and running reprepro update" @@ -41,7 +43,7 @@ echo "Checking state of mirror" $REPREPRO checkpool fast $REPREPRO check -date --iso-8601=ns +date --iso-8601=ns | $K5START tee $BASE/timestamp.txt echo "reprepro completed successfully, running vos release." k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME