PCP-207. pxp-agent needs to be able to make non-blocking calls to run puppet agent, and should be able to later report on the results of that puppet agent run even if the pxp-agent service was restarted during the puppet agent run
- The bug only occurs for pxp-agent as a service - it does not occur if you keep the pxp-agent service stopped and run pxp-agent.exe as an executable
Reproduction (of PXP use case):
- On a Windows 2012R2 vmpooler host, create a puppet environment that will take some time to complete e.g. includes an Exec resource that calls sleep for several minutes. I'm using:
- Trigger a puppet run on the agent using PXP's rpc_non_blocking_request
- Note that running puppet agent at terminal will not reproduce this issue
- The options I'm using are --server [server] --onetime --no-daemonize --environment sleep
- Puppet should now be running but stuck on the sleep exec
- Restart the pxp-agent service using 'net stop pxp-agent' then 'net start pxp-agent'
- Puppet agent (and the sleep process that puppet agent is waiting on) should still be running. The puppet agent and sleep processes will appear to be running on the host until either the sleep times out, or it receives SIGALARM
On Redhat6 and Ubuntu 14.04 the expected behaviour occurs.
Windows 21012R2 with Cygwin, or Redhat 7 (which has a separate ticket
RE-6491), stopping the pxp-agent service appears (looking at Task Manager and the Applications section of Event Viewer) to kill puppet agent.