Skip to content

Allow user-defined service restart parameter. - #57

Merged
apenney merged 1 commit into
puppetlabs:masterfrom
songkick:restart-command
Apr 3, 2014
Merged

Allow user-defined service restart parameter.#57
apenney merged 1 commit into
puppetlabs:masterfrom
songkick:restart-command

Conversation

@bleach

@bleach bleach commented Oct 9, 2013

Copy link
Copy Markdown

This allows, for example, on CentOS/Debian/Ubuntu us to use /etc/init.d/haproxy reload to restart haproxy when config changes, which:

  • includes syntax checks
  • restarts without interruption to service

Without this it's easy to push out a option with, say a typo in it, which will cause haproxy to be left in a stopped state with broken config, because /etc/init.d/haproxy restart stops haproxy then starts it.

An alternative way to achieve this would be some logic to set an appropriate restart command for each distro, but I shied away from this, because it would presumably have to take into account things like Fedora's move to systemd.

This allows, for example, use of /etc/init.d/haproxy reload to restart
haproxy when config changes, which:

- includes syntax checks
- restarts without interruption to service
@antaflos

Copy link
Copy Markdown

👍 from me, this is a very useful feature to have.

It would be even more ideal if the module could differentiate between config changes that require a restart and those that only require a reload, but I don't think this is possible with the way the module currently manages the haproxy configuration. Would probably need to move to an Augeas-based configuration like in https://github.com/rodjek/puppet-haproxy for this to work.

@blkperl

blkperl commented Mar 28, 2014

Copy link
Copy Markdown

Looks good, 👍

apenney pushed a commit that referenced this pull request Apr 3, 2014
Allow user-defined service restart parameter.
@apenney
apenney merged commit acb4651 into puppetlabs:master Apr 3, 2014
cegeka-jenkins pushed a commit to cegeka/puppet-haproxy that referenced this pull request Dec 19, 2017
Allow user-defined service restart parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants