Browse Source

Merge "Fix kill-script" into stable/train

changes/02/704402/3
Zuul Gerrit Code Review 4 weeks ago
parent
commit
fd238dc32b
1 changed files with 12 additions and 5 deletions
  1. +12
    -5
      deployment/neutron/kill-script

+ 12
- 5
deployment/neutron/kill-script View File

@@ -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,13 +57,16 @@ 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
;;
*)
add_date "Unknown action ${SIG} for ${$CT_NAME} ${CT_ID}"
add_date "Unknown action ${SIG} for ${CT_NAME} ${CT_ID}"
exit 1
;;
esac


Loading…
Cancel
Save