Closed ValkyrieOps closed 3 years ago
You'll need to add the notifies
code as well, otherwise your resource will never be referenced.
"Then use a notification to reload the unit file configuration before the service restart is called."
Hey definitely apparent my test cases were messed up, my bad. I have added a notifies
statement to the package block because I think that is the intended behavior. However now it seems the Chef runs fail due to the default agent systemd unit file not supporting a reload function. I'm probably doing this incorrectly though.
For testing sake I created a new branch here that creates a new systemd file with a reload function. That one works for me and takes care of the systemd reload on upgrade and downgrades as well with the existing service block. Let me know how to proceed here.
This passed in my testing. You'll need to correct (remove) the references to ubuntu 16.04 to the workflow pass.
Take a look at the PR I submitted against your branch, which should resolve most of the errors.
This passed in my testing. You'll need to correct (remove) the references to ubuntu 16.04 to the workflow pass.
Take a look at the PR I submitted against your branch, which should resolve most of the errors.
Merged, thank you very much for that!
This has been released on git and supermarket in 1.4.0
thank you for your contribution.
Pull Request Checklist
Is this in reference to an existing issue?
Yes. See issue #131
General
[ ] Update Changelog following the conventions laid out here
[ ] Update README with any necessary configuration snippets
[ ] Cookstyle (rubocop) passes
[ ] Rspec (unit tests) passes
[ ] Inspec (integration tests) passes
New Features
No new features added.
Purpose
Bugfix. Creates an empty systemd unit file which forces a unit reload when agents are upgraded.
Known Compatibility Issues