Allow configuring HTTP connect timeout#46102
Conversation
rallytime
left a comment
There was a problem hiding this comment.
I have one small request, and then I would also love to see docs added to the config docs.
salt/utils/http.py
Outdated
There was a problem hiding this comment.
Can you move this to the bottom of the kwargs list? We don't want to cause an API change for people or other Salt functions using query who might be calling this with args/kwargs in a certain order.
There was a problem hiding this comment.
This is the call to fetch() - http://www.tornadoweb.org/en/stable/httpclient.html#tornado.httpclient.HTTPRequest (you need to expand the minimized lines to see this, otherwise this looks like query() parameter list), and there connect_timeout comes before request_timeout.
There was a problem hiding this comment.
Oh! You're right. My apologies.
|
Added the docs for the new parameter and also for the existing http_request_timeout. I wasn't sure into which section to put them, so I created a new one. |
rallytime
left a comment
There was a problem hiding this comment.
I like the new section in the docs - That looks good! I think adding this to the minion config docs would also be good.
doc/ref/configuration/master.rst
Outdated
There was a problem hiding this comment.
This should be Fluorine for the develop branch.
|
In minion docs the related proxy_* are in "Minion Primary Configuration", so I put the new items there as well. For that reason I also moved them to "Primary Master Configuration" in master docs. |
What does this PR do?
Allows configuring HTTP connection timeout for Tornado back-end.
What issues does this PR fix or reference?
None
Previous Behavior
HTTP connection timeout was always Tornado's default of 20 seconds.
New Behavior
If not explicitly configured, HTTP connection timeout remains 20 seconds. Otherwise user-specified value is used.
Tests written?
No
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.