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
thanos: Use wget for healthcheck #594
thanos: Use wget for healthcheck #594
Conversation
Hi @Reamer. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@Reamer hello, thanks for the PR! How did you encounter this problem, are you a customer of openshift or just tried it out as I don't see in the openshift dev team? :) |
Hi @lilic, |
/ok-to-test |
@Reamer Thanks for the clarification, that makes more sense now, as we didn't see any problems. Letting the tests run if no problems will merge, thanks for the PR! :) |
/retest |
Hi @lilic, |
name: thanos-querier | ||
readinessProbe: | ||
exec: | ||
command: | ||
- sh | ||
- -c | ||
- curl http://localhost:9090/-/healthy | ||
- wget -O /dev/null http://localhost:9090/-/healthy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't work for me when testing in the container straight away, maybe thats why the tests are failing as well:
sh-4.2$ wget -O /dev/null http://localhost:9090/-/healthy
--2019-12-20 10:05:09-- http://localhost:9090/-/healthy
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:9090... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:9090... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23 [text/plain]
Saving to: '/dev/null'
100%[==================================================================================================================================================================>] 23 --.-K/s in 0s
2019-12-20 10:05:09 (2.95 MB/s) - '/dev/null' saved [23/23]
Maybe we can change it to address directly:
sh-4.2$ wget -O /dev/null http://127.0.0.1:9090/-/healthy
--2019-12-20 10:04:57-- http://127.0.0.1:9090/-/healthy
Connecting to 127.0.0.1:9090... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23 [text/plain]
Saving to: '/dev/null'
100%[==================================================================================================================================================================>] 23 --.-K/s in 0s
2019-12-20 10:04:57 (2.51 MB/s) - '/dev/null' saved [23/23]
cc @s-urbaniak I believe you worked on this part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should reference ipv4 addresses. I think wget first tries the ipv6 localhost address, fails, then retries the ipv4 address, which succeeds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localhost
is an exception and in this case it shouldn't matter if we use 127.0.0.1
or localhost
, both should work the same.
FYI: we are using 127.0.0.1
in many places, for example in node-exporter daemonset.
Sorry about that I forgot to click submit on the review right before vacation. :) |
looking at the |
/retest |
@lilic I didn't test with IPv6 network stack. After adding IPv6 to my docker daemon. I tried starting
I can reproduce your output, but the exit code of
|
Thanos won't listen on both ip addresses as golang itself won't bind to both ip addresses as per golang/go#9334. |
I think if we want to have a proper healthcheck with
Options passed to wget will reduce noise, try only once, and not download content. |
Confirm partial with @paulfantom. We should change to
I'll update my PR. |
a003e7c
to
b9c3722
Compare
You might want to reuse the work we already did in the Prometheus Operator. |
Hi @metalmatze |
Yes and no.
That's a good question. |
Use curl or wget for healthcheck. wget is needed because curl is not available in official thanos image (quay.io/thanos/thanos:v0.9.0)
b9c3722
to
77688ff
Compare
Changed PR to curl and wget. I hope that the multi line script doesn't make issues. |
/test e2e-aws-upgrade |
@paulfantom do you mind reviewing this, thanks! |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: paulfantom, Reamer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
Use wget for healthcheck, because curl is not available in official thanos image (quay.io/thanos/thanos:v0.9.0)