-
Notifications
You must be signed in to change notification settings - Fork 128
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
fix ping request in healthCheckNode #283
Conversation
@marco-jantke since we can't easily write a regression test, how about doing one or more of the following changes to
Personally, I'm in favor of option 3 since we seem to be in control of what we pass to the function, so having the leading slash would be a programming error of ours. Thus, the panic would serve as an invariant validation. Besides, how about renaming WDYT? |
I did now steps 1 and 3, I also think it makes sense to directly Also I renamed uri to path in the codebase, where it made sense. I started only at the |
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.
Excellent, looking good to me. 👍
Thanks for making go-marathon a better place. :-)
Our vendored copy contains a bug that causes unavailable Marathon nodes to never be marked as available again due to a misconstruction in the URL to the Marathon health check / ping endpoint used by go-marathon internally. A fix[1] has been published. [1]gambol99/go-marathon#283
Our vendored copy contains a bug that causes unavailable Marathon nodes to never be marked as available again due to a misconstruction in the URL to the Marathon health check / ping endpoint used by go-marathon internally. A fix[1] has been published. [1]gambol99/go-marathon#283
I was manually testing marathon member failover and stumbled over a problem with the current implementation of healthCheckNode. It builds a request like
http://127.0.0.1:57142//ping
. Testing with a Marathon cluster of version 1.3.10 I think this is a real problem.I checked the test cases and saw there are actually tests. The problem why this is not detected by the tests is that go cleans up such paths by default. See StackOverflow for some explanation. Also due to this sanitisation I was not able to come up with a good regression test :/