From dceeff22e1097bea81fb2c4c5601520becdad8cd Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Tue, 19 Nov 2019 09:26:37 -0700 Subject: [PATCH] ceph: integration: kill process grp on file-test The file-test pod still hangs sometimes when exiting. Instead of trapping SIGTERM as before, use tini's `-g` option to kill the process group. According to further reading on bash signal handling [1], Ctrl-C sends a kill signal to the entire process group in order to kill `sleep` commands. [1] Link also noted in code comments: http://mywiki.wooledge.org/SignalTrap#When_is_the_signal_handled.3F Signed-off-by: Blaine Gardner --- tests/integration/ceph_base_file_test.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/integration/ceph_base_file_test.go b/tests/integration/ceph_base_file_test.go index 5ac3450a8..fe86c169a 100644 --- a/tests/integration/ceph_base_file_test.go +++ b/tests/integration/ceph_base_file_test.go @@ -178,16 +178,10 @@ spec: image: krallin/ubuntu-tini command: - "/usr/local/bin/tini" + - "-g" - "--" - - "bash" - - "-c" - - | - pid= - trap 'exit 0' SIGTERM - trap '[[ $pid ]] && kill "$pid"' EXIT - sleep 1800 & pid=$! - wait $pid - pid= + - "sleep" + - "1800" imagePullPolicy: IfNotPresent env: volumeMounts: