Merge "Add timestamps to all stages of mirror scripts"
This commit is contained in:
commit
337816bc3f
@ -16,10 +16,13 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "Obtaining bandersnatch tokens and running bandersnatch."
|
echo "Obtaining bandersnatch tokens and running bandersnatch."
|
||||||
k5start -t -f /etc/bandersnatch.keytab service/bandersnatch -- timeout -k 2m 30m run-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."
|
echo "Bandersnatch completed successfully, running vos release."
|
||||||
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v mirror.pypi
|
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v mirror.pypi
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
@ -24,6 +24,7 @@ if ! [ -f $BASE/$REPO ]; then
|
|||||||
$K5START mkdir -p $BASE/$REPO
|
$K5START mkdir -p $BASE/$REPO
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "Running rsync..."
|
echo "Running rsync..."
|
||||||
$K5START rsync -rlptDvz \
|
$K5START rsync -rlptDvz \
|
||||||
--delete \
|
--delete \
|
||||||
@ -40,7 +41,9 @@ $K5START rsync -rlptDvz \
|
|||||||
|
|
||||||
# TODO(pabelanger): Validate rsync process
|
# TODO(pabelanger): Validate rsync process
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "rsyc completed successfully, running vos release."
|
echo "rsyc 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
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
@ -24,6 +24,7 @@ if ! [ -f $BASE/$REPO ]; then
|
|||||||
$K5START mkdir -p $BASE/$REPO
|
$K5START mkdir -p $BASE/$REPO
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "Running rsync..."
|
echo "Running rsync..."
|
||||||
$K5START rsync -rlptDvz \
|
$K5START rsync -rlptDvz \
|
||||||
--delete \
|
--delete \
|
||||||
@ -37,7 +38,9 @@ $K5START rsync -rlptDvz \
|
|||||||
|
|
||||||
# TODO(pabelanger): Validate rsync process
|
# TODO(pabelanger): Validate rsync process
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "rsyc completed successfully, running vos release."
|
echo "rsyc 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
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
@ -22,22 +22,28 @@ MIRROR_VOLUME=$2
|
|||||||
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"
|
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"
|
echo "Obtaining reprepro tokens and running reprepro update"
|
||||||
$REPREPRO update
|
$REPREPRO update
|
||||||
|
|
||||||
if [ -f $UNREF_FILE ] ; then
|
if [ -f $UNREF_FILE ] ; then
|
||||||
|
date --iso-8601=ns
|
||||||
echo "Cleaning up files made unreferenced on the last run"
|
echo "Cleaning up files made unreferenced on the last run"
|
||||||
$REPREPRO deleteifunreferenced < $UNREF_FILE
|
$REPREPRO deleteifunreferenced < $UNREF_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "Saving list of newly unreferenced files for next time"
|
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"
|
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"
|
echo "Checking state of mirror"
|
||||||
$REPREPRO checkpool fast
|
$REPREPRO checkpool fast
|
||||||
$REPREPRO check
|
$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
|
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
@ -19,10 +19,13 @@ set -e
|
|||||||
CMD="/usr/bin/registry-static"
|
CMD="/usr/bin/registry-static"
|
||||||
CMD_ARGS="-d <%= @uri_rewrite %> -o <%= @data_directory %> --blobstore afs-blob-store --hooks openstack-registry-hooks"
|
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."
|
echo "Obtaining npm tokens and running registry-static."
|
||||||
k5start -t -f /etc/npm.keytab service/npm -- timeout -k 2m 30m $CMD $CMD_ARGS
|
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."
|
echo "registry-static completed successfully, running vos release."
|
||||||
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v mirror.npm
|
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v mirror.npm
|
||||||
|
|
||||||
|
date --iso-8601=ns
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user