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 <pabelanger@redhat.com>
This commit is contained in:
parent
dc80d13291
commit
22f0ef1288
@ -18,9 +18,11 @@ set -e
|
|||||||
|
|
||||||
REPREPRO_CONFIG=$1
|
REPREPRO_CONFIG=$1
|
||||||
MIRROR_VOLUME=$2
|
MIRROR_VOLUME=$2
|
||||||
|
BASE=`cat ${REPREPRO_CONFIG}/options | grep base | cut -d' ' -f2`
|
||||||
|
|
||||||
UNREF_FILE=/var/run/reprepro/${MIRROR_VOLUME}.unreferenced-files
|
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
|
date --iso-8601=ns
|
||||||
echo "Obtaining reprepro tokens and running reprepro update"
|
echo "Obtaining reprepro tokens and running reprepro update"
|
||||||
@ -41,7 +43,7 @@ echo "Checking state of mirror"
|
|||||||
$REPREPRO checkpool fast
|
$REPREPRO checkpool fast
|
||||||
$REPREPRO check
|
$REPREPRO check
|
||||||
|
|
||||||
date --iso-8601=ns
|
date --iso-8601=ns | $K5START tee $BASE/timestamp.txt
|
||||||
echo "reprepro completed successfully, running vos release."
|
echo "reprepro completed successfully, running vos release."
|
||||||
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
|
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user