From ad12a7264e4b8aecf8d90a96a747101b5fa4871a Mon Sep 17 00:00:00 2001 From: Bruce Lee Date: Sat, 28 Jan 2017 08:01:37 -0500 Subject: [PATCH] Ensure that we don't add balancees with no health check runs if there is a health check defined on it Change test behavior --- provider/marathon.go | 3 +++ provider/marathon_test.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/provider/marathon.go b/provider/marathon.go index 046767c33..3cd50a1f1 100644 --- a/provider/marathon.go +++ b/provider/marathon.go @@ -264,6 +264,9 @@ func (provider *Marathon) taskFilter(task marathon.Task, applications *marathon. return false } } + } else { + log.Debugf("Filtering marathon task %s with defined healthcheck as no healthcheck has run yet", task.AppID) + return false } } return true diff --git a/provider/marathon_test.go b/provider/marathon_test.go index 5ed916aa5..3166ae19e 100644 --- a/provider/marathon_test.go +++ b/provider/marathon_test.go @@ -629,7 +629,7 @@ func TestMarathonTaskFilter(t *testing.T) { }, }, }, - expected: true, + expected: false, exposedByDefault: true, }, {