We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Sometimes requesting a list of healthy services (by using ?passing parameter) is missing the ones that pass all the health checks.
?passing
Example:
Query 1: http://localhost:8500/v1/health/service/some-service
http://localhost:8500/v1/health/service/some-service
{ "Checks": [ { "CheckID": "service:92bcd373e541", "Name": "Service 'some-service' check", "Node": "consul-192.168.3.223", "Notes": "", "Output": "", "ServiceID": "92bcd373e541", "ServiceName": "some-service", "Status": "passing" }, { "CheckID": "serfHealth", "Name": "Serf Health Status", "Node": "consul-192.168.3.223", "Notes": "", "Output": "Agent not live or unreachable", "ServiceID": "", "ServiceName": "", "Status": "critical" } ], "Node": { "Address": "192.168.3.223", "Node": "consul-192.168.3.223" }, "Service": { "ID": "92bcd373e541", "Port": 4001, "Service": "some-service" } }, { "Checks": [ { "CheckID": "service:4a1c7d1b374f", "Name": "Service 'some-service' check", "Node": "consul-192.168.3.165", "Notes": "", "Output": "Exception: () \n", "ServiceID": "4a1c7d1b374f", "ServiceName": "some-service", "Status": "critical" }, { "CheckID": "serfHealth", "Name": "Serf Health Status", "Node": "consul-192.168.3.165", "Notes": "", "Output": "Agent not live or unreachable", "ServiceID": "", "ServiceName": "", "Status": "critical" } ], "Node": { "Address": "192.168.3.165", "Node": "consul-192.168.3.165" }, "Service": { "ID": "4a1c7d1b374f", "Port": 49154, "Service": "some-service" } }, { "Checks": [ { "CheckID": "service:e64e53ec404f", "Name": "Service 'some-service' check", "Node": "consul-192.168.3.129", "Notes": "", "Output": "", "ServiceID": "e64e53ec404f", "ServiceName": "some-service", "Status": "passing" }, { "CheckID": "serfHealth", "Name": "Serf Health Status", "Node": "consul-192.168.3.129", "Notes": "", "Output": "Agent alive and reachable", "ServiceID": "", "ServiceName": "", "Status": "passing" } ], "Node": { "Address": "192.168.3.129", "Node": "consul-192.168.3.129" }, "Service": { "ID": "e64e53ec404f", "Port": 4001, "Service": "some-service" } }
Query 2: http://localhost:8500/v1/health/service/some-service?passing
http://localhost:8500/v1/health/service/some-service?passing
[]
But the 3rd service is clearly ok.
The bug seems to exist in this function: https://github.com/hashicorp/consul/blob/master/command/agent/health_endpoint.go#L118 After finding out that one of the health check is not passing we should remove the service from the output and break - moving on to next services.
The text was updated successfully, but these errors were encountered:
135c409
Good catch! Thanks!
Sorry, something went wrong.
Update CHANGELOG (hashicorp#241)
d59ad23
No branches or pull requests
Sometimes requesting a list of healthy services (by using
?passing
parameter) is missing the ones that pass all the health checks.Example:
Query 1:
http://localhost:8500/v1/health/service/some-service
Query 2:
http://localhost:8500/v1/health/service/some-service?passing
But the 3rd service is clearly ok.
The bug seems to exist in this function:
https://github.com/hashicorp/consul/blob/master/command/agent/health_endpoint.go#L118
After finding out that one of the health check is not passing we should remove the service from the output and break - moving on to next services.
The text was updated successfully, but these errors were encountered: