Add handling of signal 15 in kill script
The reason bug #1860155 was triggered was because the kill script did not have a stanza for handling the signal that was passed in, which is signal 15. Since signal 15 is unhandled, keepalived processes will still stick around. Add handling for signal 15. Change-Id: I632a3ef5ec137df10f647335f6354589c2316fd0 Related-bug: #1860155
This commit is contained in:
parent
b45d4c6d21
commit
06dc258a28
@ -40,9 +40,13 @@ kill_container() {
|
||||
$CLI rm $2
|
||||
}
|
||||
|
||||
hup_container() {
|
||||
add_date "Sending HUP signal to $1 ($2)"
|
||||
$CLI kill --signal HUP $2
|
||||
signal_container() {
|
||||
SIGNAL=$3
|
||||
if [ -z "$SIGNAL" ]; then
|
||||
SIGNAL="HUP"
|
||||
fi
|
||||
add_date "Sending signal '$SIGNAL' to $1 ($2)"
|
||||
$CLI kill --signal $SIGNAL $2
|
||||
}
|
||||
|
||||
{% raw -%}
|
||||
@ -53,11 +57,14 @@ if [ -f /proc/$PID/cgroup ]; then
|
||||
|
||||
case $SIG in
|
||||
HUP)
|
||||
hup_container $CT_NAME $CT_ID
|
||||
signal_container $CT_NAME $CT_ID
|
||||
;;
|
||||
9)
|
||||
kill_container $CT_NAME $CT_ID
|
||||
;;
|
||||
15)
|
||||
signal_container $CT_NAME $CT_ID 15
|
||||
;;
|
||||
*)
|
||||
add_date "Unknown action ${SIG} for ${CT_NAME} ${CT_ID}"
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user