-
Notifications
You must be signed in to change notification settings - Fork 41
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
Spurious HTTP Check updates #158
Comments
Thanks for blazing the trail @Foxlik, we're hitting this issue too as part of an attempted change to provide values for The issue appears to be this code: https://github.com/hashicorp/consul/blob/6d9df7aedbc28bc5531ed9812ee86319c5848648/agent/checks/check.go#L466-L482. When I believe the correct thing to do is to create a new instance of A workaround is to include the same default header values |
Thank you @eikenb. Let me know if I can help in any way. |
I'm trying to reproduce this and can't seem to get any content in the HTTP headers. Could you expand a bit on..
Maybe give a couple examples of "any change" to be sure I'm hitting the same paths as you? Sorry for asking about basics... I'm still getting up to speed on ESM and have little experience reproducing errors with it as of yet. Thanks. |
NM... I was missing the Header section in my external service definition. :P |
Pushed up a PR of what I have in mind. #171 |
I think that approach should work well enough |
I do have an external service defined in Consul:
with following HTTP check:
And every time there is any change to Consul database the HTTP Check in ESM gets updated because of Headers mismatch on
consul-esm/check.go
Line 119 in 93a8ff1
httpCheck.Header=
"map[Accept:[text/plain, text/*, */*] Host:[infradb-k8s.rfiserve.net] User-Agent:[Consul Health Check]]"
and
http.Header=
map[Host:[infradb-k8s.rfiserve.net]]
So it seems that Consul is adding some Headers of its own causing the mistmatch. The check gets updated to what's in the definition and next time there is any change in Consul database (that causes check to be compared) this happens again.
Thanks to this happening so often, I've also found a deadlock in the update itself. Another issue to follow.
The text was updated successfully, but these errors were encountered: