Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http/tcp checks: fix long timeout behavior to default to user-configured value #6094

Merged
merged 4 commits into from
Jul 16, 2019

Conversation

s-mang
Copy link
Contributor

@s-mang s-mang commented Jul 8, 2019

In lieu of #5835 by @pierresouchay (thanks for your PR!!)

Fixes #5834

@hashicorp-cla
Copy link

hashicorp-cla commented Jul 8, 2019

CLA assistant check
All committers have signed the CLA.

@s-mang
Copy link
Contributor Author

s-mang commented Jul 8, 2019

Forgot to update docs! New commit coming..

Copy link
Contributor

@freddygv freddygv left a comment

Choose a reason for hiding this comment

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

This looks good @adams-sarah!

However, we should wait to merge for now until we figure out the upcoming release schedule. This will be a significant change for anyone who had a long configured timeout that was getting clipped.

We also need to think about how much we should reword the docs regarding the "interval" flag. We mention in several places that requests are made every interval, but a realization from #5835 was that the we wait for interval time after each check returns (or times out).

The time between checks starting is interval + max(timeout, check duration) rather than just interval:
https://github.com/hashicorp/consul/blob/master/agent/checks/check.go#L99-L101

@freddygv
Copy link
Contributor

freddygv commented Jul 8, 2019

The checks docs should likely look more like this:

HTTP + Interval - These checks make an HTTP GET request to the specified URL, waiting between requests for the specified interval time (eg. 30s).

@pearkes pearkes added this to the 1.6.0-beta2 milestone Jul 9, 2019
@s-mang s-mang changed the base branch from master to release/1-6 July 9, 2019 19:28
@s-mang
Copy link
Contributor Author

s-mang commented Jul 9, 2019

Changed base branch to release/1-6 because this is a breaking change.

@s-mang
Copy link
Contributor Author

s-mang commented Jul 16, 2019

@freddygv PTAL @ docs whenever you get a chance!

Copy link
Contributor

@freddygv freddygv left a comment

Choose a reason for hiding this comment

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

These look good @adams-sarah, just have some minor comments inline.

Let me know what you think.

the HTTP response code: any `2xx` code is considered passing, a `429 Too Many
Requests` is a warning, and anything else is a failure. This type of check
* HTTP + Interval - These checks make an HTTP `GET` request to the specified URL,
waiting the specified Interval amount of time (eg. 30 seconds) between requests.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this reads a little easier if the eg isn't in the middle of the sentence:

Suggested change
waiting the specified Interval amount of time (eg. 30 seconds) between requests.
waiting between requests for the specified interval time (eg. 30 seconds).

Also we probably shouldn't be capitalizing "interval" in the description anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good! shall I codify interval like timeout is? (interval)? that's sort of what i was expecting in the docs

website/source/docs/agent/checks.html.md Show resolved Hide resolved
website/source/docs/agent/checks.html.md Outdated Show resolved Hide resolved
Copy link
Contributor

@freddygv freddygv left a comment

Choose a reason for hiding this comment

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

Perfect, thanks!

@s-mang s-mang merged commit ea2bd5b into release/1-6 Jul 16, 2019
@s-mang s-mang deleted the feature/agent-understandable-timeouts branch July 16, 2019 22:13
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.

None yet

4 participants