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

Is it possible to disable healthcheck for a specific app #612

Open
soualid opened this issue Feb 7, 2019 · 4 comments
Open

Is it possible to disable healthcheck for a specific app #612

soualid opened this issue Feb 7, 2019 · 4 comments

Comments

@soualid
Copy link

soualid commented Feb 7, 2019

Hello,

I am aware of the -H --health-check option but I am looking for a way to disable health check for specific apps, I guess it should be possible using a proper HAPROXY_0_BACKEND_HTTP_HEALTHCHECK_OPTIONS label but I cannot find a hint on how to achieve that in the documentation.

Sorry if the question has already been asked somewhere.

Thank you in advance.

@paambaati
Copy link
Contributor

@soualid Simply omit the healthChecks parameter from your Marathon app's definition?

@soualid
Copy link
Author

soualid commented Feb 17, 2019

@paambaati I can't because I need marathon to keep restarting the application if its health check fails maxConsecutiveFailures times, but actually, using marathon-lb in sse mode remove the application from the haproxy configuration at the first failure (when the application switch to an Unhealthy state while it is still running and available).

It could be useful to make this behavior configurable, not sure it is actually feasible without hard coding the ports configuration in marathon as well as in the HAPROXY_HEAD file of marathon-lb.

@minyk
Copy link

minyk commented Feb 28, 2019

@soualid See this: https://github.com/mesosphere/marathon-lb/blob/master/Longhelp.md#haproxy_backend_server_options
So, use template like:

"labels": {
  "HAPROXY_0_BACKEND_SERVER_OPTIONS": "  server {serverName} {host_ipv4}:{port}{cookieOptions}{otherOptions}\n"
}

Above template don't make healthcheck option for the haproxy in marathon-lb.

@soualid
Copy link
Author

soualid commented Feb 28, 2019

Thank you @minyk but I think it will not work when using the sse mode that will remove the backend totally from the haproxy configuration if no healthy backend is available.

In fact, I would like to have a flag that make marathon-lb keep unhealthy backend in the haproxy configuration.

It would be especially useful for single instance applications, which are actually made inaccessible by marathon-lb immediately when a healthcheck fails, even if the maxConsecutiveFailures is greater than 1 for this application definition in marathon.

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

No branches or pull requests

3 participants