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
This commit is contained in:
Diogo Gomes 2016-09-14 12:44:37 -03:00 committed by Emile Vauge
parent 52737e91e5
commit 1e324ad3bc
2 changed files with 2 additions and 4 deletions

View file

@ -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

View file

@ -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,
},
{