From 2a3a34a80c2d2eed6c52fa711f6ddcbbce8311bc Mon Sep 17 00:00:00 2001 From: Emile Vauge Date: Tue, 19 Apr 2016 12:00:22 +0200 Subject: [PATCH] Fix Marathon backend Signed-off-by: Emile Vauge --- examples/compose-marathon.yml | 2 +- provider/marathon.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/compose-marathon.yml b/examples/compose-marathon.yml index e0be6a038..7239cba8f 100644 --- a/examples/compose-marathon.yml +++ b/examples/compose-marathon.yml @@ -43,7 +43,7 @@ marathon: command: --event_subscriber http_callback traefik: - image: traefik + image: containous/traefik command: -c /dev/null --web --logLevel=DEBUG --marathon --marathon.domain marathon.localhost --marathon.endpoint http://172.17.0.1:8080 --marathon.watch ports: - "8000:80" diff --git a/provider/marathon.go b/provider/marathon.go index 1f8b07599..64f8b2e9f 100644 --- a/provider/marathon.go +++ b/provider/marathon.go @@ -69,6 +69,7 @@ func (provider *Marathon) Provide(configurationChan chan<- types.ConfigMessage, return err } pool.Go(func(stop chan bool) { + defer close(update) for { select { case <-stop: @@ -86,6 +87,11 @@ func (provider *Marathon) Provide(configurationChan chan<- types.ConfigMessage, } }) } + configuration := provider.loadMarathonConfig() + configurationChan <- types.ConfigMessage{ + ProviderName: "marathon", + Configuration: configuration, + } return nil }