← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad-buildd/chrootwait-retry into lp:launchpad-buildd

 

Colin Watson has proposed merging lp:~cjwatson/launchpad-buildd/chrootwait-retry into lp:launchpad-buildd.

Commit message:
Retry "apt-get update" on failure after a short delay, as this occasionally fails due to racing with an archive pulse.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/chrootwait-retry/+merge/203029

"apt-get update" fails often enough to be annoying, due to racing with an archive pulse.  We generally notice this from the FTBFS failures and retry them manually, but it's a manual step that shouldn't be necessary and it's probably not done very effectively for PPAs.  It's really a bug in the archive layout that this is possible in the first place, although a difficult and complex one to fix.  However, I think we could work around this quite effectively by just retrying after a short delay.  Since the builders point directly at the master systems rather than mirrors, 15 seconds should more than suffice.
-- 
https://code.launchpad.net/~cjwatson/launchpad-buildd/chrootwait-retry/+merge/203029
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad-buildd/chrootwait-retry into lp:launchpad-buildd.
=== modified file 'debian/changelog'
--- debian/changelog	2014-01-23 12:34:46 +0000
+++ debian/changelog	2014-01-24 10:41:07 +0000
@@ -1,3 +1,10 @@
+launchpad-buildd (121) UNRELEASED; urgency=medium
+
+  * Retry "apt-get update" on failure after a short delay, as this
+    occasionally fails due to racing with an archive pulse.
+
+ -- Colin Watson <cjwatson@xxxxxxxxxx>  Fri, 24 Jan 2014 10:34:01 +0000
+
 launchpad-buildd (120) hardy; urgency=low
 
   [ Colin Watson ]

=== modified file 'update-debian-chroot'
--- update-debian-chroot	2014-01-11 16:43:14 +0000
+++ update-debian-chroot	2014-01-24 10:41:07 +0000
@@ -67,6 +67,9 @@
 export DEBIAN_FRONTEND=noninteractive
 export TTY=unknown
 
-$SUDO $CHROOT $ROOT $APTGET -uy update < /dev/null
+if ! $SUDO $CHROOT $ROOT $APTGET -uy update < /dev/null; then
+	echo "Waiting 15 seconds and trying again ..." >&2
+	$SUDO $CHROOT $ROOT $APTGET -uy update < /dev/null
+fi
 $SUDO $CHROOT $ROOT $APTGET $OPTIONS -uy --purge dist-upgrade < /dev/null
 


Follow ups