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

Allow for lazy/eager systemctl daemon reloading #111

Merged
merged 1 commit into from
Jun 7, 2019

Conversation

JohnLyman
Copy link
Contributor

Add param for systemd::dropin_file to allow for lazy (the default behavior) or eager systemctl daemon reloading.

In some cases, the systemctl daemon should be reloaded before the related service is refreshed. For example, when overriding ExecStart. With the current behavior, it is impossible to do so if the systemd::dropin_file and related service are contained in the same class. There is also a potential for circular dependencies with multiple services that depend on each other and have multiple drop-in files associated with them.

The new lazy option emulates the current behavior, deferring the reload until (most likely) near the end of the Puppet run. It also has the advantage of only reloading the daemon once.

The eager option allows for the daemon to be reloaded immediately after changes to the specified drop-in file, at the cost of causing multiple reloads if there are multiple systemd::dropin_file resources.

@bastelfreak
Copy link
Member

Hi, thanks for the PR!

@bastelfreak bastelfreak added the enhancement New feature or request label Jun 7, 2019
@bastelfreak bastelfreak merged commit a6f1c18 into voxpupuli:master Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants