Given the Puppet service is a simple timer that triggers puppet --onetime runs, there can be some conditions where the service has stopped, but Puppet runs are ongoing. This can cause issues when attempting to initiate another puppet run immediately via puppet agent -t. We've seen such a problem in CI as documented in PE-11063.
A couple of ideas have been suggested as a solution:
- Try to send SIGINT to the child process (which is not something Windows natively supports). There is supposedly a way to get this to work, though it may be quite tricky:
- Use NSSM - the Non-Sucking Service Manager to properly manage the ruby process
- This is probably the better option if the licensing and redistribution are an OK fit