diff --git a/docs/user-guide/marathon.md b/docs/user-guide/marathon.md index 5df0ee2da..961687575 100644 --- a/docs/user-guide/marathon.md +++ b/docs/user-guide/marathon.md @@ -130,7 +130,6 @@ As such, there is no way to handle this situation deterministically. Finally, Marathon health checks are not mandatory (the default is to use the task state as reported by Mesos), so requiring them for Traefik would raise the entry barrier for Marathon users. Traefik used to use the health check results as a strict requirement but moved away from it as [users reported the dramatic consequences](https://github.com/containous/traefik/issues/653). -If health check results are known to exist, however, they will be used to signal task availability. #### Draining diff --git a/provider/marathon/config.go b/provider/marathon/config.go index 9e66a94c9..bca5bef56 100644 --- a/provider/marathon/config.go +++ b/provider/marathon/config.go @@ -153,18 +153,6 @@ func (p *Provider) taskFilter(task marathon.Task, application marathon.Applicati return false } - // Filter task with existing, bad health check results. - if application.HasHealthChecks() { - if task.HasHealthCheckResults() { - for _, healthCheck := range task.HealthCheckResults { - if !healthCheck.Alive { - log.Debugf("Filtering Marathon task %s from application %s with bad health check", task.ID, application.ID) - return false - } - } - } - } - if ready := p.readyChecker.Do(task, application); !ready { log.Infof("Filtering unready task %s from application %s", task.ID, application.ID) return false diff --git a/provider/marathon/config_test.go b/provider/marathon/config_test.go index d2fefa093..3be769846 100644 --- a/provider/marathon/config_test.go +++ b/provider/marathon/config_test.go @@ -935,51 +935,6 @@ func TestTaskFilter(t *testing.T) { ), expected: true, }, - { - desc: "healthcheck available", - task: task(taskPorts(80)), - application: application( - appPorts(80), - healthChecks(marathon.NewDefaultHealthCheck()), - ), - expected: true, - }, - { - desc: "healthcheck result false", - task: task( - taskPorts(80), - healthCheckResultLiveness(false), - ), - application: application( - appPorts(80), - healthChecks(marathon.NewDefaultHealthCheck()), - ), - expected: false, - }, - { - desc: "healthcheck results mixed", - task: task( - taskPorts(80), - healthCheckResultLiveness(true, false), - ), - application: application( - appPorts(80), - healthChecks(marathon.NewDefaultHealthCheck()), - ), - expected: false, - }, - { - desc: "healthcheck result true", - task: task( - taskPorts(80), - healthCheckResultLiveness(true), - ), - application: application( - appPorts(80), - healthChecks(marathon.NewDefaultHealthCheck()), - ), - expected: true, - }, { desc: "readiness check false", task: task(taskPorts(80)),