Add timestamps to all stages of mirror scripts

Change-Id: Idae9ac7981b6df7cd261f3d176a0c1d613063dd1
This commit is contained in:
James E. Blair 2016-05-19 10:29:31 -07:00
parent 469aa94598
commit 1759b41d4b
5 changed files with 19 additions and 1 deletions

View File

@ -16,10 +16,13 @@
set -e
date --iso-8601=ns
echo "Obtaining bandersnatch tokens and running bandersnatch."
k5start -t -f /etc/bandersnatch.keytab service/bandersnatch -- timeout -k 2m 30m run-bandersnatch
date --iso-8601=ns
echo "Bandersnatch completed successfully, running vos release."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v mirror.pypi
date --iso-8601=ns
echo "Done."

View File

@ -24,6 +24,7 @@ if ! [ -f $BASE/$REPO ]; then
$K5START mkdir -p $BASE/$REPO
fi
date --iso-8601=ns
echo "Running rsync..."
$K5START rsync -rlptDvz \
--delete \
@ -40,7 +41,9 @@ $K5START rsync -rlptDvz \
# TODO(pabelanger): Validate rsync process
date --iso-8601=ns
echo "rsyc completed successfully, running vos release."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
date --iso-8601=ns
echo "Done."

View File

@ -24,6 +24,7 @@ if ! [ -f $BASE/$REPO ]; then
$K5START mkdir -p $BASE/$REPO
fi
date --iso-8601=ns
echo "Running rsync..."
$K5START rsync -rlptDvz \
--delete \
@ -37,7 +38,9 @@ $K5START rsync -rlptDvz \
# TODO(pabelanger): Validate rsync process
date --iso-8601=ns
echo "rsyc completed successfully, running vos release."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
date --iso-8601=ns
echo "Done."

View File

@ -22,22 +22,28 @@ MIRROR_VOLUME=$2
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"
date --iso-8601=ns
echo "Obtaining reprepro tokens and running reprepro update"
$REPREPRO update
if [ -f $UNREF_FILE ] ; then
date --iso-8601=ns
echo "Cleaning up files made unreferenced on the last run"
$REPREPRO deleteifunreferenced < $UNREF_FILE
fi
date --iso-8601=ns
echo "Saving list of newly unreferenced files for next time"
k5start -t -f /etc/reprepro.keytab service/reprepro -- bash -c "reprepro --confdir $REPREPRO_CONFIG dumpunreferenced > $UNREF_FILE"
date --iso-8601=ns
echo "Checking state of mirror"
$REPREPRO checkpool fast
$REPREPRO check
echo "reprepro completed successfully, running reprepro export."
date --iso-8601=ns
echo "reprepro completed successfully, running vos release."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
date --iso-8601=ns
echo "Done."

View File

@ -19,10 +19,13 @@ set -e
CMD="/usr/bin/registry-static"
CMD_ARGS="-d <%= @uri_rewrite %> -o <%= @data_directory %> --blobstore afs-blob-store --hooks openstack-registry-hooks"
date --iso-8601=ns
echo "Obtaining npm tokens and running registry-static."
k5start -t -f /etc/npm.keytab service/npm -- timeout -k 2m 30m $CMD $CMD_ARGS
date --iso-8601=ns
echo "registry-static completed successfully, running vos release."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v mirror.npm
date --iso-8601=ns
echo "Done."