claranet / puppet-consul_template

A Puppet module to manage the config and jobs of Consul Template from Hashicorp
Apache License 2.0
30 stars 89 forks source link

consul template doesn't die with systemd #83

Closed jarro2783 closed 7 years ago

jarro2783 commented 8 years ago

I think the latest version of consul template changed its default kill signal. From the docs:

// This is the signal to listen for to trigger a graceful stop. The default
// value is shown below. Setting this value to the empty string will cause CT
// to not listen for any graceful stop signals.
kill_signal = "SIGINT"

It seems like SIGTERM is ignored, which systemd tries to send when stopping the consul template service, and then sends SIGKILL 90 seconds later to kill it.

Can the puppet module either change the default or change the kill signal in the systemd unit file?

sts commented 7 years ago

+1 this causes a long delay before consul-template stops or restarts. Adding kill_signal = "SIGTERM" to config.json resolves this issue.

This could be made configurable and the once configured value can be specified both in config.json as well as the systemd service template eg.: KillSignal=SIGTERM https://www.freedesktop.org/software/systemd/man/systemd.kill.html#

craigwatson commented 7 years ago

Apologies for the delay here, this has been fixed in #94.