Skip to content

Allow configuring HTTP connect timeout#46102

Merged
rallytime merged 1 commit intosaltstack:developfrom
mephi42:develop
Feb 26, 2018
Merged

Allow configuring HTTP connect timeout#46102
rallytime merged 1 commit intosaltstack:developfrom
mephi42:develop

Conversation

@mephi42
Copy link
Contributor

@mephi42 mephi42 commented Feb 19, 2018

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.

@mephi42 mephi42 requested a review from a team as a code owner February 19, 2018 14:10
Copy link
Contributor

@DmitryKuzmenko DmitryKuzmenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@rallytime rallytime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one small request, and then I would also love to see docs added to the config docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! You're right. My apologies.

@mephi42
Copy link
Contributor Author

mephi42 commented Feb 23, 2018

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.

Copy link
Contributor

@rallytime rallytime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the new section in the docs - That looks good! I think adding this to the minion config docs would also be good.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be Fluorine for the develop branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mephi42
Copy link
Contributor Author

mephi42 commented Feb 24, 2018

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.

@rallytime rallytime merged commit f9408ce into saltstack:develop Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants