Closed Mark-Powerco closed 5 months ago
The feels like a duplicate of #224 and #127?
Yes, I would say it is a duplicate (my bad), however this issue is logged as a feature request. If should be taking a different path to request features, then please direct me accordingly. Thanks.
Both feature requests and bugs should be reported here, using the different options when raising an issue.
As this is a duplicate, I'll go ahead and close this.
Duplicate of #224
Checklist
Is Your Feature Request Related To A Problem? Please describe.
I would like to request the ability to configure the number and frequency of retries the Chocolatey Agent service performs when attempting to connect to the Chocolatey Management Service. This is most apparent during service startup, and also periodically every 30 minutes (by default) when the agent "calls home".
We rely on a VPN-like tunnelling solution to facilitate connectivity between our client devices running Chocolatey Agent and the server running the Chocolatey Management Service. For whatever reason, if the tunnel is not available, the Chocolatey Agent service performs a finite number of cycles before completely giving up on further connection attempts. In this case the chocolatey-agent service is still running, yet the agent will not attempt any further connection attempts unless the service (or Windows) is restarted.
From simulation (using 127.0.0.1 in a hosts file) I can see that the agent makes 3 attempts over the course of 60 seconds to connect to the Chocolatey Management Service URL. The agent repeats this cycle 3 times in total:
After the 3rd and final cycle, the agent effectively shuts down and no further connections will be attempted (manual investigation/intervention is required).
Looking at the documentation, it does not appear as though there is any way to control the frequency and numeracy of these connection attempts to make the agent a little more resilient to network-related issues. I would prefer to be able to spread these connection attempts over a wider period, hopefully avoiding reaching the point where the agent completely shuts down. If there were some way to define these values as a package attribute, this would be most welcome.
Our relevant package versions:
Describe The Solution. Why is it needed?
The most plausible solution would be to allow for additional parameters on the chocolatey-agent package which allows for customised frequency and numeracy of the connection attempts made by the agent to the Chocolatey Management Service URL.
Another possible solution could involve a 'choco config' command (similar to 'centralManagementServiceUrl') which the Chocolatey Agent service will consume to define the frequency/numeracy of the connection attempts.
Alternatively, another possible solution could involve the configuration of prepared values in the 'chocolatey-agent.exe.config' file which has an affect on the connection attempts made by the Chocolatey Agent service. This is similar in most respects to the 'appsettings.json' file used by Chocolatey Central Management Database and Website packages.
Additional Context
No response
Related Issues
No response