From 1e324ad3bc0f5d3be933c7d910584e7904ac4c8e Mon Sep 17 00:00:00 2001 From: Diogo Gomes Date: Wed, 14 Sep 2016 12:44:37 -0300 Subject: [PATCH] If Marathon doesn't have healthcheck, assume it's ok (#665) Healthcheck are not mandatory, so if a result is not present, assume it is ok to continue. Fixes the case when a new leader is elected and don't have any healthcheck result's, returning 404 to all requests. https://github.com/containous/traefik/issues/653 --- provider/marathon.go | 3 --- provider/marathon_test.go | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/provider/marathon.go b/provider/marathon.go index 0967254f8..bef3d7633 100644 --- a/provider/marathon.go +++ b/provider/marathon.go @@ -234,9 +234,6 @@ func taskFilter(task marathon.Task, applications *marathon.Applications, exposed return false } } - } else { - log.Debugf("Filtering marathon task %s with bad healthcheck", task.AppID) - return false } } return true diff --git a/provider/marathon_test.go b/provider/marathon_test.go index a9ac67afb..af47a23bf 100644 --- a/provider/marathon_test.go +++ b/provider/marathon_test.go @@ -5,6 +5,7 @@ import ( "testing" "errors" + "github.com/containous/traefik/mocks" "github.com/containous/traefik/types" "github.com/gambol99/go-marathon" @@ -324,7 +325,7 @@ func TestMarathonTaskFilter(t *testing.T) { }, }, }, - expected: false, + expected: true, exposedByDefault: true, }, {