From 02aeb21f9ae30b6b5f2307b07cf26975b7e359a8 Mon Sep 17 00:00:00 2001 From: Daniel Greene Date: Tue, 16 Jan 2018 22:22:32 -0800 Subject: [PATCH] set killmode/killsignal in systemd example The default (control-group) kill mode in systemd will kill the associated executors, leading to a commonly seen behavior of nomad client restarts losing all current allocations. setting the KillSignal to SIGINT seems to be a reasonable default, and allows things like leave_on_interrupt to function --- dist/systemd/nomad.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist/systemd/nomad.service b/dist/systemd/nomad.service index 44545152779..331d2f31313 100644 --- a/dist/systemd/nomad.service +++ b/dist/systemd/nomad.service @@ -3,6 +3,8 @@ Description=Nomad Documentation=https://nomadproject.io/docs/ [Service] +KillMode=process +KillSignal=SIGINT ExecStart=/usr/bin/nomad agent -config /etc/nomad ExecReload=/bin/kill -HUP $MAINPID LimitNOFILE=65536