-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Fix systemctl daemon-reload after file additions #277
Conversation
* Add a `systemd::daemon_reload` defined type * Ensure that any file additions to the /etc/systemd/system space are followed by a call to `systemd::daemon_reload` * Allow users to disable the calls to `systemd::daemon_reload` * Allow users to globally disable the `systemctl daemon-reload` exec using a resource collector if necessary * Hook the daemon reload between the file creation and the service as is usually necessary, where possible * Add a 'best effort' optional exec as `systemd::lazy_daemon_reload` to try and clean up systems that were modified betweedn 2.9.0 and this release Fixes #234 Fixes #199
@op-ct For reference. Fixes the issues with simp/pupmod-simp-gdm/pull/77. |
@ekohl and/or @alexjfisher Are you all OK with this? |
@ekohl I removed the lazy reload and am creating a ticket for follow-on work to fix it properly. |
Proper management of NFS also needs this fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small nits. We do have a few more redundant daemon-reload calls now which does worry me a bit. Puppet 6.1.0 and higher should automatically call systemctl daemon-reload if needed on a managed service. Do you have drop in files for unmanaged services that you run into this or is the deamon-reload code in Puppet broken? (I did run into theforeman/puppet-puppet#832 but that was only on Ubuntu 20.04).
I think I can live with some redundant daemon-reloads but there are a few small code suggestions inline that I'd like to see applied.
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed partially on IRC (captured in #284) this looks good to me. I'd label this an enhancement since IMHO it deserves a minor version bump rather than just a patch bump.
Oh, and can we squash this? Can be done on merge. @alexjfisher any last thoughts? |
systemd::daemon_reload
defined typefollowed by a call to
systemd::daemon_reload
systemd::daemon_reload
systemctl daemon-reload
execusing a resource collector if necessary
usually necessary, where possible
Fixes #234
Fixes #199