From 1759b41d4b7fd6056d74f49a3c53b444ae519f5e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 19 May 2016 10:29:31 -0700 Subject: [PATCH] Add timestamps to all stages of mirror scripts Change-Id: Idae9ac7981b6df7cd261f3d176a0c1d613063dd1 --- .../openstack_project/files/bandersnatch-mirror-update.sh | 3 +++ .../files/mirror/centos-mirror-update.sh | 3 +++ .../openstack_project/files/mirror/epel-mirror-update.sh | 3 +++ .../files/reprepro/reprepro-mirror-update.sh | 8 +++++++- modules/openstack_project/templates/npm-mirror-update.sh | 3 +++ 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/openstack_project/files/bandersnatch-mirror-update.sh b/modules/openstack_project/files/bandersnatch-mirror-update.sh index 4c9568c8ec..f00a38e9b1 100644 --- a/modules/openstack_project/files/bandersnatch-mirror-update.sh +++ b/modules/openstack_project/files/bandersnatch-mirror-update.sh @@ -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." diff --git a/modules/openstack_project/files/mirror/centos-mirror-update.sh b/modules/openstack_project/files/mirror/centos-mirror-update.sh index 2c2ded7d66..284edd5336 100755 --- a/modules/openstack_project/files/mirror/centos-mirror-update.sh +++ b/modules/openstack_project/files/mirror/centos-mirror-update.sh @@ -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." diff --git a/modules/openstack_project/files/mirror/epel-mirror-update.sh b/modules/openstack_project/files/mirror/epel-mirror-update.sh index a97d74fc16..a79c322a3c 100755 --- a/modules/openstack_project/files/mirror/epel-mirror-update.sh +++ b/modules/openstack_project/files/mirror/epel-mirror-update.sh @@ -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." diff --git a/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh b/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh index e4c5a898c7..a9fd7c094e 100644 --- a/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh +++ b/modules/openstack_project/files/reprepro/reprepro-mirror-update.sh @@ -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." diff --git a/modules/openstack_project/templates/npm-mirror-update.sh b/modules/openstack_project/templates/npm-mirror-update.sh index dd95e1a8d5..afa32d055e 100644 --- a/modules/openstack_project/templates/npm-mirror-update.sh +++ b/modules/openstack_project/templates/npm-mirror-update.sh @@ -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."