Open ogrodnek opened 8 years ago
I recently updated to this version to get rid of 503's, It works great if the healthcheck is http or tcp.
Though if healthcheck is based on command ( say curl), Marathon actually shows it as healthy but consul json has "healthCheckResults" set to null. So now Haproxy fails to pick it up based on healthy value ( "healthy":false).
any reason why?
Hi! Thanks again for the great project.
As mentioned in https://github.com/CiscoCloud/marathon-consul/issues/24 , when using marathon-consul with haproxy-consul , we see tasks added to haproxy before they are healthy.
This PR adds a
HealthCheckResults
field to the Task (already reported by marathon), as well as a conveniencehealthy
flag to make it easier to work with in templates.Tasks health information is updated on receiving
health_status_changed_event
from marathon.healthy
is currently a bool, but in reality it's more of a tri-state (unknown, healthy, unhealthy). currently it will report healthy=false unless there is a successful health check (again makes it easier to work with in templates).I'd love any feedback to making this work better or to better integrate with the existing code.
thanks! larry