Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
PUP 4.6.2, PUP 4.10.4
-
TEST_TARGET=windows2008r2-64a
SUITE_VERSION=1.6.2.135.g8a48f21
SUITE_COMMIT=8a48f210f6901be0edba16eb49c1bfbfb07d338b
-
Platform OS
-
Platform OS Kanban
-
Customer Feedback
-
Major
-
3 - 25-50% of Customers
-
4 - Major
-
5 - $$$$$$
-
-
35233,36103
-
2
-
Bug Fix
-
Puppet can now set ensure = running/stopped on paused Windows services.
Description
When a service is in the Paused state; it's 'ensure' property cannot be managed by Puppet
Note that for our own services that use nssm; nssm has a characteristic that it uses the "Paused" service state for a service that has reached a fault state (see https://nssm.cc/usage )
To reproduce:
- Install puppet-agent
- Ensure pxp-agent service is stopped in services.msc
- Ensure the ProgramData/PuppetLabs/pxp-agent/etc/pxp-agent.conf file is renamed or deleted
- Run puppet resource service pxp-agent ensure=running
The service will now be in the paused state.
Attempting puppet resource service pxp-agent ensure=stopped will echo back ensure=stopped , but services.msc will show the service as still paused.
Attempting puppet resource service pxp-agent ensure=running will return an error:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Puppet>puppet resource serv
|
ice pxp-agent ensure=running
|
Error: Cannot start pxp-agent, error was: Execution of 'C:/Windows/system32/net.
|
exe start pxp-agent' returned 2: The requested service has already been started.
|
|
|
More help is available by typing NET HELPMSG 2182.
|
Wrapped exception:
|
Execution of 'C:/Windows/system32/net.exe start pxp-agent' returned 2: The reque
|
sted service has already been started.
|
|
More help is available by typing NET HELPMSG 2182.
|
Error: /Service[pxp-agent]/ensure: change from stopped to running failed: Cannot
|
start pxp-agent, error was: Execution of 'C:/Windows/system32/net.exe start pxp
|
-agent' returned 2: The requested service has already been started.
|
|
More help is available by typing NET HELPMSG 2182.
|
Outside of Puppet, the service can be stopped by simply using the Stop option in services.msc
Expected behaviour:
- The "Paused" state should be understood by Puppet for a Windows service resource. Or at least; Puppet should actually stop a service in the "Paused" state when ensure=stopped is applied.
Attachments
Issue Links
- is blocked by
-
PUP-9189 Refactor the state transition code in the Windows::Service module
-
- Closed
-
- relates to
-
PUP-5475 Windows Service provider should use something better than net.exe - perhaps direct FFI access
-
- Closed
-
-
PA-1850 PXP fails to start after a Puppet Agent upgrade with SSL library errors
-
- Closed
-
-
PCP-286 Acceptance test failure on Windows due to "Device or resource busy" when removing log file
-
- Closed
-