forked from linkerd/linkerd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude Marathon tasks in health-check grace period (linkerd#2098) (l…
…inkerd#2099) This fixes linkerd#2098. The Marathon namer has a `useHealthCheck` option that allows for excluding tasks that Marathon claims to be unhealthy. However, if a Marathon app has a health-check grace period defined, a freshly started task will show up as running, but without any health-related status. In this case the Marathon API returns a `TASK_RUNNING` status, but there aren't any `healthCheckResults` present in the response. Obviously, Linkerd should not route any request to such task and wait until it shows up as healthy. My change adds a check if a Marathon app has any health checks defined (a non-empty `healthChecks` attribute of the `app` record), and, if so, expect the same number of `healthCheckResults` to be positive before routing any request to such task. I have added unit tests that include the `healthChecks` attribute in the Marathon API response and verify that the Marathon namer behavior is as expected. Signed-off-by: Tomasz Rogozik <trogozik@applause.com>
- Loading branch information
Showing
2 changed files
with
321 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.