summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2014-07-18 17:00:37 +0200
committerHolger Levsen <holger@layer-acht.org>2014-07-20 14:53:20 +0200
commit35de20101c9e7473a84aa8b71146e31b3f9e2bfe (patch)
tree35b19a19dbf2eb44f835e8a22d68dbe9f96e78e6
parent3ec00e33258ccd69182f0b38bcabf9521513c995 (diff)
downloadjenkins.debian.net-35de20101c9e7473a84aa8b71146e31b3f9e2bfe.tar.xz
slow down when debootstrap fails
When one debootstrap fails, chroot-run finishes very quickly. That way a temporary network failure quickly eats the whole jenkins job queue producing large numbers of false errors. Rather delay such failures, hoping that they healed themselves after the delay.
-rwxr-xr-xbin/chroot-run.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh
index 53b16003..cac853bc 100755
--- a/bin/chroot-run.sh
+++ b/bin/chroot-run.sh
@@ -47,7 +47,11 @@ bootstrap() {
echo force-unsafe-io > "$CHROOT_TARGET/etc/dpkg/dpkg.cfg.d/02dpkg-unsafe-io"
echo "Bootstraping $DISTRO into $CHROOT_TARGET now."
- sudo debootstrap $DISTRO $CHROOT_TARGET $MIRROR
+ if ! sudo debootstrap $DISTRO $CHROOT_TARGET $MIRROR; then
+ echo "debootstrap failed, slowing down"
+ sleep 1800
+ exit 1
+ fi
cat > $CHROOT_TARGET/tmp/chroot-prepare <<-EOF
$SCRIPT_HEADER