Skip to content
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

update task health status based on health_status_changed_event #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

update task health status based on health_status_changed_event #25

wants to merge 2 commits into from

Conversation

ogrodnek
Copy link

Hi! Thanks again for the great project.

As mentioned in #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 convenience healthy 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

@yogeshnath
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants