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 <blaine.gardner@suse.com>
This commit is contained in:
1 file changed
+3
-9
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user