(#9329) Disable agent daemonizing on Windows #105
Merged
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.
Running puppet agent on Windows with the default set of options fails
because the win32-process gem doesn't really support fork (it
re-executes the parent program, but doesn't preserve the parent
context), and then it fails to setsid as this call is not implemented
by the ruby runtime.
But the bigger issue is that Windows services are the preferred way to
run daemon processes. For this release, we will not be providing the
code to run puppet agent as a service, though we have verified that
puppet will run as a service using a third-party service wrapper,
nssm.
This commit changes the daemonize option to default to false on
Windows, so that the typical 'puppet agent' command does the right
thing. And if the daemonize option is set to true on Windows, it will
report an error.