Skip to content
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

(#9329) Disable agent daemonizing on Windows #105

Conversation

joshcooper
Copy link
Contributor

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.

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.
ChaseMotorman added a commit that referenced this pull request Sep 27, 2011
…ze-option-on-windows

Verified the default behavior of 'puppet agent' is identical to 'puppet agent --no-daemonize', and 'puppet agent -daemonize' fails the options parse with ""Could not parse options: Cannot daemonize on Windows".
@ChaseMotorman ChaseMotorman merged commit 7f8c288 into puppetlabs:2.7.x Sep 27, 2011
@ChaseMotorman
Copy link
Contributor

Verified the default behavior of 'puppet agent' is identical to 'puppet agent --no-daemonize', and 'puppet agent -daemonize' fails the options parse with ""Could not parse options: Cannot daemonize on Windows".

Iristyle pushed a commit to Iristyle/puppet that referenced this pull request Sep 9, 2014
…te_spec_for_eos

(RE-1472) Update pe-puppet spec for EOS
melissa pushed a commit to melissa/puppet that referenced this pull request Mar 30, 2018
…_rake

(maint) Run ssh-agent in Rake so ssh keys are available to beaker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants