Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Systemd unit file improvements #304

Merged
merged 2 commits into from
Dec 29, 2016

Conversation

amiryal
Copy link
Contributor

@amiryal amiryal commented Dec 22, 2016

Since the merge of #301, I learned some more about Consul’s defaults, and I also stumbled upon an example systemd.service file inside the official consul repository.

In the example unit file, the option is set to Restart=on-failure, so I decided to align with that, and let a human operator shut the agent down manually with a kill signal, rather than having to always use systemctl for that.

The reason for changing KillSignal back to its default SIGTERM is explained in #282 (comment) – in short, it prevents admins from shooting themselves in the foot by unintentionally altering quorum size on server termination. Thanks to Consul developer Armon Dadgar for highlighting the issue.

Since Consul 0.7, client-mode agents are shutting down gracefully by
default, so no need to send them a SIGINT specially. The default for
server-mode agents is still not to leave gracefully on SIGTERM, but it
was left this way for a reason. To override this, it is better to set
the leave_on_terminate option, rather than changing the KillSignal.
Let a human shut the agent down manually with a kill signal.
@solarkennedy solarkennedy merged commit 1c26e21 into voxpupuli:master Dec 29, 2016
spuder pushed a commit to spuder/puppet-consul that referenced this pull request Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants