Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Night's Watch
-
1
-
NW - 2021-03-31
-
43338,43466,43640,43750
-
4
-
Not Needed
-
Needs Assessment
Description
Basic Info:
- Module: Puppet_agent module
- Script: install_puppet.ps1
- Version: 2.2.0 or any version using the install_puppet.ps1 script with hard coded 2 minute timeout parameters.
Problem description:
Recently encountered a customer issue where the post Puppet agent run was taking longer than two minutes waiting for the pxp-agent process to end. This caused the install_puppet.ps1 script to hit the hard coded 2 minute timeout parameter, forcing the agent upgrade to fail.
Current script doesn't allow or account for scenario's where the post run command can take longer than 2 minutes to complete and there isn't any configuration options to adjust the parameter or forcibly kill the long running process.
Desired behavior:
Two sections of the script that leverage a timeout parameter, proposing the following.
- The timeout that waits for Puppet agent process to finish:
- Proposing to make that a configurable parameter to adjust this timeout if necessary.
- https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/master/files/install_puppet.ps1#L280-L281
- The second timeout that waits for the pxp-agent process to terminate:
- Not a configurable option, however it would be desirable for install_puppet.ps1 script to forcibly kill this process after a grace period, in the event is doesn't terminate by itself.
- https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/master/files/install_puppet.ps1#L307
- Jira ticket: https://tickets.puppetlabs.com/browse/FM-7628 explains the inconsistency in process ending successfully.
Actual behavior:
Both timeouts will force the script to fail after 2 minutes and log the appropriate error message.