-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
Do a daemon reload for static units #199
Conversation
Services that are deployed by systemd::timer need to trigger a `systemctl daemon-reload` when the .service file is changed. systemd::timer { 'foo.timer': timer_content => $foo_timer, service_content => $foo_service, active => true, enable => true, } results in a foo.service that is neither active nor enabled. It is a "static" unit that will be triggered by the foo.timer alone. This fixes voxpupuli#190 and more specifically: voxpupuli#190 (comment) Signed-off-by: Simon Deziel <[email protected]>
Can you also update the tests in https://github.com/voxpupuli/puppet-systemd/blob/master/spec/defines/unit_file_spec.rb to cover this? That way we don't have a regression. |
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.
I think this change is good, but as @kenyon said: tests would be nice.
@simondeziel do you think you could add a test for this? |
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
03f2939
to
6c4de90
Compare
Signed-off-by: Simon Deziel <[email protected]>
6c4de90
to
b705e44
Compare
* 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 Fixes #234 Fixes #199
* 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
* 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 Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
Services that are deployed by systemd::timer need to trigger a
systemctl daemon-reload
when the .service file is changed.results in a
foo.service
that is neither active nor enabled. It is a "static" unit that will be triggered by thefoo.timer
alone. This fixes #190 and more specifically: #190 (comment)