Restart Puppet Agent service after updating the package #712
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using something like this on FreeBSD to manage Puppet Agent...
This works well for normal operation, but when performing an upgrade of Puppet Agent...
...things start to break. Note that the service was not restarted after performing the package upgrade. This leads to arbitrary errors during all subsequent Puppet Agent runs, here are some of my favorite errors:
(Note that these errors won't occur on a manual Puppet run, they will only be triggered by the Puppet Agent service that survived the upgrade.)
I did some tests and apparently a restart of Puppet Agent is required to avoid these issues. So with the proposed patch applied the same upgrade looks like this:
I was unable to reproduce this issue on Linux servers, so this might be an issue specific to Puppet Agent on FreeBSD. However, I think it's the right thing to restart the Puppet Agent service on all platforms.