From 35de20101c9e7473a84aa8b71146e31b3f9e2bfe Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 18 Jul 2014 17:00:37 +0200 Subject: 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. --- bin/chroot-run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2