-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
agent: add option to discard health output #3562
Conversation
This still needs a test and testing :) |
47d9105
to
a744596
Compare
tests are done. |
@magiconair thank you! 🥇 |
In high volatile environments consul will have checks with "noisy" output which changes every time even though the status does not change. Since the output is stored in the raft log every health check update unblocks a blocking call on health checks since the raft index has changed even though the status of the health checks may not have changed at all. By discarding the output of the health checks the users can choose a different tradeoff. Less visibility on why a check failed in exchange for a reduced change rate on the raft log.
4f1f7c0
to
7894536
Compare
@magiconair Thank for this fix! We've been waiting for it since the version 0.6.3 :) Thanks! |
@123BLiN No. That's the tradeoff. |
@magiconair |
Oh this is cool. That didn't even occur to me. |
Version 1.0.0 * tag 'v1.0.0': (455 commits) Release v1.0.0 Puts the tree in 1.0 final release mode. Fixes an XSS issue with unescaped node names. (hashicorp#3578) Adds a note about the Raft protocol not being the same as the Consul protocol. Adds a 1.0 section to the upgrade guide and cleans up the change log. Update sentinel.html.markdown.erb Update dns forwarding documentation (hashicorp#3574) Adds a brief wait and poll period to update check status after a timeout. (hashicorp#3573) Cleans up some drift between the OSS and Enterprise trees. Clarify the docs around script check timeout behavior Updates the change log. Kill check processes after the timeout is reached (hashicorp#3567) Updates the change log. retry locks on network errors (hashicorp#3553) Fix example code formatting in godoc config: remove redundant code config: fix check for segment.port <= 0 and add test Adds check to make sure port is given so we avoid a nil bind address. Removes obsolete segment stub. agent: add option to discard health output (hashicorp#3562) ...
@magiconair If I have a check like this: {
"args": [
"/bin/sh",
"-c",
"\"curl --silent http://localhost:9200/_cluster/health | grep green\""
],
"interval": "10s"
} The output will be something like this: {"cluster_name":"app-cluster","status":"green","timed_out":false} and the unix exit code will be Without the discard option, will the terminal output be written to raft? Or is it something else that might be written to raft? The way I understood the consul docs was that only the exit code of a script check is considered. |
In high volatile environments consul will have checks with "noisy"
output which changes every time even though the status does not change.
Since the output is stored in the raft log every health check update
unblocks a blocking call on health checks since the raft index has
changed even though the status of the health checks may not have changed
at all. By discarding the output of the health checks the users can
choose a different tradeoff. Less visibility on why a check failed in
exchange for a reduced change rate on the raft log.
See fabiolb/fabio#368