-
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
X-Consul-Knownleader: false in dev mode #10945
Comments
Hi @dzharikhin, could you help us by answering a few questions:
My initial guess is that the test may be a flake - occasionally it takes some time to establish a leader and internally we wrap leader checks in retries for our integration tests. |
Hi, yes, the test fails consistently and yes it fails on 1.10 image as well I'm not sure that true leader establishment is having place at all in single node development mode, but to check your guess I increased pause https://github.com/rickfast/consul-client/blob/master/src/itest/java/com/orbitz/consul/cache/ServiceHealthCacheITest.java#L44 up to a second and still having the same result, so maybe time interval is not the cause |
Thank you for the explanation! I found this related issue #9776 which discusses the problem with
This is not a bug but rather a changed behaviour, which is unfortunate. I'm not sure if the latest release of orbitz addressed this change. I encourage you to continue the discussion in #9776 so our team can better track common issues. |
Overview of the Issue
In dev mode request to
/agent/check/fail/:check_id
returns headerX-Consul-Knownleader: false
in responseIn practice unit-test in java consul-client started to fail on the latest consul docker image
But it successfully passes on tag consul:1.9 - header in the test has
true
valueIn the release notes I found nothing suspicious since v1.9
So maybe bug
Reproduction Steps
Just clone the repo, get java and run the test
Line with failed request: https://github.com/rickfast/consul-client/blob/master/src/itest/java/com/orbitz/consul/cache/ServiceHealthCacheITest.java#L43
You can change consul options in https://github.com/rickfast/consul-client/blob/cb738bff54032ed1303219bcd1e7aeca89a56f49/src/itest/java/com/orbitz/consul/BaseIntegrationTest.java#L22-L25
Log Fragments
server logs seem ok to me
The text was updated successfully, but these errors were encountered: