Merge pull request #45 from EmileVauge/emilevauge-marathon-bugs

Corrects https://github.com/EmileVauge/traefik/issues/37
This commit is contained in:
Vincent Demeester 2015-10-08 19:08:51 +02:00
commit af674dffdb

View file

@ -112,6 +112,10 @@ func (provider *MarathonProvider) loadMarathonConfig() *Configuration {
return false return false
} }
application := getApplication(task, applications.Apps) application := getApplication(task, applications.Apps)
if application == nil {
log.Errorf("Unable to get marathon application from task %s", task.AppID)
return false
}
_, err := strconv.Atoi(application.Labels["traefik.port"]) _, err := strconv.Atoi(application.Labels["traefik.port"])
if len(application.Ports) > 1 && err != nil { if len(application.Ports) > 1 && err != nil {
log.Debug("Filtering marathon task with more than 1 port and no traefik.port label", task.AppID) log.Debug("Filtering marathon task with more than 1 port and no traefik.port label", task.AppID)