From 002beaa75d6897a3fe911839240a5a76d5c4dbf9 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 6 Jan 2016 15:56:07 +0100 Subject: kill all processes run under /usr/bin/timeout too --- bin/reproducible_cleanup_nodes.sh | 2 +- bin/reproducible_slay.sh | 3 ++- hosts/bpi0-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/cbxi4pro0-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/ff2a-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/ff2b-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/hb0-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/jenkins-test-vm/etc/sudoers.d/jenkins | 1 + hosts/jenkins/etc/sudoers.d/jenkins | 1 + hosts/odxu4-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/odxu4b-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/odxu4c-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/opi2a-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/profitbricks-build1-amd64/etc/sudoers.d/jenkins | 1 + hosts/profitbricks-build2-amd64/etc/sudoers.d/jenkins | 1 + hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins | 6 +++++- hosts/profitbricks-build4-amd64/etc/sudoers.d/jenkins | 6 +++++- hosts/profitbricks-build5-amd64/etc/sudoers.d/jenkins | 1 + hosts/profitbricks-build6-amd64/etc/sudoers.d/jenkins | 1 + hosts/rpi2b-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/rpi2c-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/wbd0-armhf-rb/etc/sudoers.d/jenkins | 1 + hosts/wbq0-armhf-rb/etc/sudoers.d/jenkins | 1 + 23 files changed, 32 insertions(+), 4 deletions(-) diff --git a/bin/reproducible_cleanup_nodes.sh b/bin/reproducible_cleanup_nodes.sh index c6dd7d26..a3efbcd8 100755 --- a/bin/reproducible_cleanup_nodes.sh +++ b/bin/reproducible_cleanup_nodes.sh @@ -41,7 +41,7 @@ for NODE in $BUILD_NODES ; do # jenkins_master_wrapper.sh needs NODE_NAME and JOB_NAME export NODE_NAME=$NODE echo "$(date -u) - Killing build processes on $NODE now:" - /srv/jenkins/bin/jenkins_master_wrapper.sh /srv/jenkins/bin/reproducible_slay.sh + /srv/jenkins/bin/jenkins_master_wrapper.sh /srv/jenkins/bin/reproducible_slay.sh || true echo "$(date -u) - done killing processes on $NODE." done diff --git a/bin/reproducible_slay.sh b/bin/reproducible_slay.sh index 81fe5528..a6fceae2 100755 --- a/bin/reproducible_slay.sh +++ b/bin/reproducible_slay.sh @@ -3,10 +3,11 @@ # Copyright 2015 Holger Levsen # released under the GPLv=2 -set -e +set +e # usually called by /srv/jenkins/bin/reproducible_cleanup_nodes.sh # this script just kills everyone… +sudo killall timeout # all builds are done using timeout sudo slay 1111 sudo slay 2222 pgrep -u 1111,2222 diff --git a/hosts/bpi0-armhf-rb/etc/sudoers.d/jenkins b/hosts/bpi0-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/bpi0-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/bpi0-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/cbxi4pro0-armhf-rb/etc/sudoers.d/jenkins b/hosts/cbxi4pro0-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/cbxi4pro0-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/cbxi4pro0-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/ff2a-armhf-rb/etc/sudoers.d/jenkins b/hosts/ff2a-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/ff2a-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/ff2a-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/ff2b-armhf-rb/etc/sudoers.d/jenkins b/hosts/ff2b-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/ff2b-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/ff2b-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/hb0-armhf-rb/etc/sudoers.d/jenkins b/hosts/hb0-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/hb0-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/hb0-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/jenkins-test-vm/etc/sudoers.d/jenkins b/hosts/jenkins-test-vm/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/jenkins-test-vm/etc/sudoers.d/jenkins +++ b/hosts/jenkins-test-vm/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/jenkins/etc/sudoers.d/jenkins b/hosts/jenkins/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/jenkins/etc/sudoers.d/jenkins +++ b/hosts/jenkins/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/odxu4-armhf-rb/etc/sudoers.d/jenkins b/hosts/odxu4-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/odxu4-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/odxu4-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/odxu4b-armhf-rb/etc/sudoers.d/jenkins b/hosts/odxu4b-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/odxu4b-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/odxu4b-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/odxu4c-armhf-rb/etc/sudoers.d/jenkins b/hosts/odxu4c-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/odxu4c-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/odxu4c-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/opi2a-armhf-rb/etc/sudoers.d/jenkins b/hosts/opi2a-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/opi2a-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/opi2a-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/profitbricks-build1-amd64/etc/sudoers.d/jenkins b/hosts/profitbricks-build1-amd64/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/profitbricks-build1-amd64/etc/sudoers.d/jenkins +++ b/hosts/profitbricks-build1-amd64/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/profitbricks-build2-amd64/etc/sudoers.d/jenkins b/hosts/profitbricks-build2-amd64/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/profitbricks-build2-amd64/etc/sudoers.d/jenkins +++ b/hosts/profitbricks-build2-amd64/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins b/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins index f59860d4..fa4778f6 100644 --- a/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins +++ b/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins @@ -9,7 +9,11 @@ jenkins ALL= \ /bin/rm -rf --one-file-system /srv/live-build/*, \ /bin/mv /schroots/* /schroots/*, \ /bin/umount -l /schroots/*, \ - /bin/mount --bind * + /bin/mount --bind *, \ + /usr/bin/killall timeout, \ + /usr/sbin/slay 1111, \ + /usr/sbin/slay 2222, \ + /usr/sbin/slay jenkins # keep these environment variables Defaults env_keep += "http_proxy", env_reset diff --git a/hosts/profitbricks-build4-amd64/etc/sudoers.d/jenkins b/hosts/profitbricks-build4-amd64/etc/sudoers.d/jenkins index cccfc2d5..a2d8890b 100644 --- a/hosts/profitbricks-build4-amd64/etc/sudoers.d/jenkins +++ b/hosts/profitbricks-build4-amd64/etc/sudoers.d/jenkins @@ -2,7 +2,11 @@ jenkins ALL= \ NOPASSWD: /usr/sbin/debootstrap *, \ /usr/sbin/chroot /chroots/*, \ /bin/rm -rf --one-file-system /chroots/*, \ - /bin/umount -l /chroots/* + /bin/umount -l /chroots/*, \ + /usr/bin/killall timeout, \ + /usr/sbin/slay 1111, \ + /usr/sbin/slay 2222, \ + /usr/sbin/slay jenkins # keep these environment variables Defaults env_keep += "http_proxy", env_reset diff --git a/hosts/profitbricks-build5-amd64/etc/sudoers.d/jenkins b/hosts/profitbricks-build5-amd64/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/profitbricks-build5-amd64/etc/sudoers.d/jenkins +++ b/hosts/profitbricks-build5-amd64/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/profitbricks-build6-amd64/etc/sudoers.d/jenkins b/hosts/profitbricks-build6-amd64/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/profitbricks-build6-amd64/etc/sudoers.d/jenkins +++ b/hosts/profitbricks-build6-amd64/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/rpi2b-armhf-rb/etc/sudoers.d/jenkins b/hosts/rpi2b-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/rpi2b-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/rpi2b-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/rpi2c-armhf-rb/etc/sudoers.d/jenkins b/hosts/rpi2c-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/rpi2c-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/rpi2c-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/wbd0-armhf-rb/etc/sudoers.d/jenkins b/hosts/wbd0-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/wbd0-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/wbd0-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins diff --git a/hosts/wbq0-armhf-rb/etc/sudoers.d/jenkins b/hosts/wbq0-armhf-rb/etc/sudoers.d/jenkins index ee9d2d2c..b3e138e3 100644 --- a/hosts/wbq0-armhf-rb/etc/sudoers.d/jenkins +++ b/hosts/wbq0-armhf-rb/etc/sudoers.d/jenkins @@ -44,6 +44,7 @@ jenkins ALL= \ /usr/bin/dcmd rm *.changes, \ /usr/bin/dcmd rm *.dsc, \ /usr/bin/apt-get update, \ + /usr/bin/killall timeout, \ /usr/sbin/slay 1111, \ /usr/sbin/slay 2222, \ /usr/sbin/slay jenkins -- cgit v1.2.3-70-g09d2