PATCH] Add a bunch more logging to buildrawide to a buildrawhide.out file.
Kevin Fenzi
kevin at scrye.com
Wed Feb 19 17:24:46 UTC 2014
From 21bc9756a734b4f985e9a3191d1b11e101644517 Mon Sep 17 00:00:00 2001
From: Kevin Fenzi <kevin at scrye.com>
Date: Wed, 19 Feb 2014 10:17:47 -0700
Subject: [PATCH] Add a bunch more logging to buildrawide to a buildrawhide.out
file.
---
scripts/buildrawhide | 38 ++++++++++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/scripts/buildrawhide b/scripts/buildrawhide
index 35568b6..085cfa0 100755
--- a/scripts/buildrawhide
+++ b/scripts/buildrawhide
@@ -48,9 +48,11 @@ DESTPATH="$TREEPREFIX/development/rawhide/"
TMPDIR=`mktemp -d /tmp/rawhide.$DATE.XXXX`
mkdir -p /mnt/koji/mash/rawhide-$DATE/logs
-echo "Compose started at `date --utc`" > /mnt/koji/mash/rawhide-$DATE/logs/start
+echo "Compose started at "$(date --utc) > /mnt/koji/mash/rawhide-$DATE/logs/start"
echo >> /mnt/koji/mash/rawhide-$DATE/logs/start
+touch /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
+echo "$(date --utc) buildrawhide: started" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
# Emit a message using bodhi's cert (since we should be running as "masher").
echo "{\"log\": \"start\", \"branch\": \"rawhide\", \"arch\": \"$ARCH\"}" | fedmsg-logger \
--cert-prefix bodhi \
@@ -58,6 +60,7 @@ echo "{\"log\": \"start\", \"branch\": \"rawhide\", \"arch\": \"$ARCH\"}" | fedm
--topic rawhide.start \
--json-input
+echo "$(date --utc) buildrawhide: git clone of comps started" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
pushd $TMPDIR
git clone git://git.fedorahosted.org/comps.git && {
pushd comps
@@ -66,12 +69,16 @@ git clone git://git.fedorahosted.org/comps.git && {
popd
}
popd
+echo "$(date --utc) buildrawhide: git clone of comps finished" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
[ -f /mnt/koji/mash/rawhide-$DATE/logs/comps-rawhide.xml ] || exit 1
+echo "$(date --utc) buildrawhide: mock init" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
mock -r $MOCKCONFIG --uniqueext=$DATE --init
+echo "$(date --utc) buildrawhide: mock install base packages" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
mock -r $MOCKCONFIG --uniqueext=$DATE --no-clean --install koji yum createrepo cvs make intltool findutils mash yum-utils rsync repoview hardlink
# Copy in the hosts file so that we get the right address for koji
+echo "$(date --utc) buildrawhide: mock setup /etc/hosts" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
mock -r $MOCKCONFIG --uniqueext=$DATE --copyin /etc/hosts /etc/hosts >/dev/null 2>&1 # this reports to fail, but actually works
# Emit a message using bodhi's cert (since we should be running as "masher").
@@ -81,6 +88,7 @@ echo "{\"log\": \"start\", \"branch\": \"rawhide\", \"arch\": \"$ARCH\"}" | fedm
--topic rawhide.mash.start \
--json-input
+echo "$(date --utc) buildrawhide: starting mash" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
# Drop privs here so that we run as the masher UID
mock -r $MOCKCONFIG --uniqueext=$DATE --unpriv --chroot "mash $MASHOPTS -p $TREEPREFIX/development/rawhide -o /mnt/koji/mash/rawhide-$DATE --compsfile /mnt/koji/mash/rawhide-$DATE/logs/comps-rawhide.xml rawhide$EXPANDARCH > /mnt/koji/mash/rawhide-$DATE/logs/mash.log 2>&1" || exit 1
@@ -91,13 +99,20 @@ echo "{\"log\": \"done\", \"branch\": \"rawhide\", \"arch\": \"$ARCH\"}" | fedms
--topic rawhide.mash.complete \
--json-input
+echo "$(date --utc) buildrawhide: finished mash" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
+echo "$(date --utc) buildrawhide: starting hardlink" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
# hardlink the noarch deltarpms between x86_64 and i386
mock -r $MOCKCONFIG --uniqueext=$DATE --chroot "hardlink -v -c /mnt/koji/mash/rawhide-$DATE/rawhide$EXPANDARCH/*/os/drpms/"
+echo "$(date --utc) buildrawhide: finished hardlink" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
+echo "$(date --utc) buildrawhide: starting repodiff" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
mock -r $MOCKCONFIG --uniqueext=$DATE --chroot "rm -f /var/lib/rpm/__db*"
mock -r $MOCKCONFIG --uniqueext=$DATE --unpriv --chroot "/usr/bin/repodiff -s -q --new=file:///mnt/koji/mash/rawhide-$DATE/rawhide$EXPANDARCH/source/SRPMS --old=file://$TREEPREFIX/development/rawhide/source/SRPMS > /mnt/koji/mash/rawhide-$DATE/logs/repodiff"
+echo "$(date --utc) buildrawhide: finished repodiff" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
+echo "$(date --utc) buildrawhide: starting spam-o-matic" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
mock -r $MOCKCONFIG --uniqueext=$DATE --unpriv --chroot "/usr/share/mash/spam-o-matic $DEPOPTS /mnt/koji/mash/rawhide-$DATE/rawhide$EXPANDARCH >/mnt/koji/mash/rawhide-$DATE/logs/depcheck" &
+echo "$(date --utc) buildrawhide: finished spam-o-matic" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
# Emit a message using bodhi's cert (since we should be running as "masher").
echo "{\"log\": \"start\", \"branch\": \"$BRANCHED\", \"arch\": \"$ARCH\"}" | fedmsg-logger \
@@ -106,16 +121,20 @@ echo "{\"log\": \"start\", \"branch\": \"$BRANCHED\", \"arch\": \"$ARCH\"}" | fe
--topic rawhide.pungify.start \
--json-input
+echo "$(date --utc) buildrawhide: starting critppath generation" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
#only run critpath on primary arch
[ -z "$ARCH" ] && {
./scripts/critpath.py --url file:///mnt/koji/mash/$DIST-$DATE/$BRANCHED/ -o /mnt/koji/mash/$DIST-$DATE/logs/critpath.txt branched &> /mnt/koji/mash/$DIST-$DATE/logs/critpath.log
+echo "$(date --utc) buildrawhide: finished critppath generation" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
+echo "$(date --utc) buildrawhide: starting pungify" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
for basearch in armhfp i386 x86_64 ; do
HOST=$(koji list-hosts --quiet --enabled --ready --arch=$basearch --channel compose | sed 's|/| |g' | sort -g -k4 -k5r | awk -F ' ' '{ print $1 ; exit }')
./scripts/pungify $DATE $BRANCHED $basearch $HOST $DIST > /mnt/koji/mash/$DIST-$DATE/logs/pungify-$basearch.log 2>&1 &
done
}
wait
+echo "$(date --utc) buildrawhide: finished pungify" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
# Emit a message using bodhi's cert (since we should be running as "masher").
echo "{\"log\": \"done\", \"branch\": \"$BRANCHED\", \"arch\": \"$ARCH\"}" | fedmsg-logger \
@@ -124,20 +143,27 @@ echo "{\"log\": \"done\", \"branch\": \"$BRANCHED\", \"arch\": \"$ARCH\"}" | fed
--topic rawhide.pungify.complete \
--json-input
+echo "$(date --utc) buildrawhide: starting build_composeinfo" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
echo "Running build_composeinfo"
./scripts/build_composeinfo --name Fedora-${BRANCHED}-${DATE} /mnt/koji/mash/$DIST-$DATE/$BRANCHED/
wait
+echo "$(date --utc) buildrawhide: finished build_composeinfo" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
+echo "$(date --utc) buildrawhide: starting mock clean" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
mock -r $MOCKCONFIG --uniqueext=$DATE --clean
+echo "$(date --utc) buildrawhide: finished mock clean" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
[ -n "$NOSYNC" ] && exit $rc
+echo "$(date --utc) buildrawhide: started linking finished tree" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
# Create a rawhide link in /mnt/koji/mash, deltas et al depend on this
rm /mnt/koji/mash/$DIST
ln -s /mnt/koji/mash/$DIST-$DATE/$BRANCHED$EXPANDARCH/ /mnt/koji/mash/$DIST
+echo "$(date --utc) buildrawhide: finished linking finished tree" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
-echo "Compose finished at `date --utc`" > /mnt/koji/mash/rawhide-$DATE/logs/finish
+echo "Compose finished at $(date --utc)" >> /mnt/koji/mash/rawhide-$DATE/logs/finish
echo >> /mnt/koji/mash/rawhide-$DATE/logs/finish
+echo "$(date --utc) buildrawhide: finished compose" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
# Emit a message using bodhi's cert (since we should be running as "masher").
echo "{\"log\": \"start\", \"branch\": \"rawhide\", \"arch\": \"$ARCH\"}" | fedmsg-logger \
@@ -146,10 +172,12 @@ echo "{\"log\": \"start\", \"branch\": \"rawhide\", \"arch\": \"$ARCH\"}" | fedm
--topic rawhide.rsync.start \
--json-input
+echo "$(date --utc) buildrawhide: started rawhide compose sync" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
# data
$RSYNCPREFIX /usr/bin/rsync $RSYNC_OPTS --exclude repodata/ /mnt/koji/mash/rawhide-$DATE/rawhide$EXPANDARCH/ $DESTPATH
# repodata & cleanup
$RSYNCPREFIX /usr/bin/rsync $RSYNC_OPTS --delete --delete-after /mnt/koji/mash/rawhide-$DATE/rawhide$EXPANDARCH/ $DESTPATH
+echo "$(date --utc) buildrawhide: finished rawhide compose sync" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
if [ "$?" = "0" ]; then
export mail=0
@@ -162,9 +190,11 @@ echo "{\"log\": \"done\", \"branch\": \"rawhide\", \"arch\": \"$ARCH\"}" | fedms
--topic rawhide.rsync.complete \
--json-input
+echo "$(date --utc) buildrawhide: starting sending rawhide email report" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
if [ "$mail" = "0" ]; then
cat /mnt/koji/mash/rawhide-$DATE/logs/start /mnt/koji/mash/rawhide-$DATE/logs/depcheck /mnt/koji/mash/rawhide-$DATE/logs/repodiff /mnt/koji/mash/rawhide-$DATE/logs/finish | mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $MAIL
fi
+echo "$(date --utc) buildrawhide: finished sending rawhide email report" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
[ -z "$ARCH" ] && {
# Emit a message using bodhi's cert (since we should be running as "masher").
@@ -174,13 +204,17 @@ echo "{\"log\": \"start\", \"branch\": \"$BRANCHED\", \"arch\": \"$ARCH\"}" | fe
--topic rawhide.image.start \
--json-input
+echo "$(date --utc) buildrawhide: started checking out spin-kickstarts" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
cd ../
git clone git://git.fedorahosted.org/git/spin-kickstarts/
cd spin-kickstarts
#git checkout f$BRANCHED
+echo "$(date --utc) buildrawhide: finished checking out spin-kickstarts" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
+echo "$(date --utc) buildrawhide: started building live/arm/cloud images" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
../releng/scripts/build-livecds $BRANCHED $DATE $BRANCHED
../releng/scripts/build-arm-images $BRANCHED $DATE $BRANCHED
../releng/scripts/build-cloud-images $BRANCHED $DATE $BRANCHED
+echo "$(date --utc) buildrawhide: finished starting building live/arm/cloud images" >> /mnt/koji/mash/rawhide-$DATE/logs/buildrawhide.out
# Emit a message using bodhi's cert (since we should be running as "masher").
echo "{\"log\": \"done\", \"branch\": \"$BRANCHED\", \"arch\": \"$ARCH\"}" | fedmsg-logger \
--
1.9.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/rel-eng/attachments/20140219/e95e92a6/attachment.sig>
More information about the rel-eng
mailing list