On Wed, Mar 13, 2013 at 09:51:01AM -0600, Kevin Fenzi wrote:
On Wed, 13 Mar 2013 10:35:00 -0500 Chris Adams cmadams@hiwaay.net wrote:
Once upon a time, Dave Jones davej@redhat.com said:
Having my local mirror wiped when I rsynced todays rawhide tree was unexpected. Having to do a full rsync again is a pain.
wtf happened that caused the mirrors to be empty ?
Ouch. I see that too. IIRC this happened before (maybe last branch?). There should be some "safety check" that no more than X% of files get removed in a push (where X is probably small).
It's being fixed up now.
Sorry for the trouble...
http://git.fedorahosted.org/cgit/releng/tree/scripts/buildrawhide
is the script that makes rawhide. Patches welcome.
Something like this (obv. untested) might at least stop wiping the whole tree when something gets screwed up.
I guessed at the logging part, I don't know if 'failed' is valid there.
Dave
--- 1/buildrawhide~ 2013-03-13 12:28:34.613042461 -0400 +++ 2/buildrawhide 2013-03-13 12:34:03.488671561 -0400 @@ -111,7 +111,7 @@ mock -r $MOCKCONFIG --uniqueext=$DATE -- rm /mnt/koji/mash/rawhide ln -s /mnt/koji/mash/rawhide-$DATE/rawhide$EXPANDARCH/ /mnt/koji/mash/rawhide
-echo "Compose finisheded 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
# Emit a message using bodhi's cert (since we should be running as "masher"). @@ -122,6 +122,19 @@ echo "{"log": "start", "branch": \ --json-input
cd /tmp + +# Check that we actually have RPMs to write out. +COUNT=$(find . -name "*.rpm" | wc -l) +if [ $COUNT-eq 0 ] ; then + echo "No rpms generated. Something went horribly wrong\n" >> /mnt/koji/mash/rawhide-$DATE/logs/finish + echo "{"log": "failed", "branch": "rawhide", "arch": "$ARCH"}" | fedmsg-logger \ + --cert-prefix bodhi \ + --modname compose \ + --topic rawhide.rsync.complete \ + --json-input + exit +fi + # data $RSYNCPREFIX /usr/bin/rsync $RSYNC_OPTS --exclude repodata/ /mnt/koji/mash/rawhide-$DATE/rawhide$EXPANDARCH/ $DESTPATH # repodata & cleanup