From f23343e5a597328d52670a9f6e8f87e30a4f9651 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 9 Jun 2015 10:46:07 +0200 Subject: [PATCH] tarbal: kill lingering ceph-mon / ceph-osd When a make check fails it is entirely possible that ceph-osd remain, because they have their own process group. Kill whatever ceph-osd or ceph-mon are left behind. We kill ceph-osd / ceph-mon regardless of the success / failure status of make check because we also want to address the case where a test pretends to succeed but left daemons behind. http://tracker.ceph.com/issues/11929 Fixes: #11929 Signed-off-by: Loic Dachary --- build-ceph.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-ceph.sh b/build-ceph.sh index e6a7f44..f875125 100755 --- a/build-ceph.sh +++ b/build-ceph.sh @@ -86,7 +86,10 @@ function display_failures() { make -j$(get_processors) "$@" || exit 4 -# run "make check", but give it a time limit in case a test gets stuck +# run "make check", but give it a time limit in case a test gets stuck + +trap "pkill ceph-osd ; pkill ceph-mon" EXIT + if ! ../maxtime 3600 make $(maybe_parallel_make_check) check "$@" ; then display_failures . exit 5 -- 2.39.5