1
0
mirror of https://github.com/containous/traefik.git synced 2025-01-11 05:17:52 +03:00

kv: Log error when checking existence of server url key

This commit is contained in:
Kristian Klausen 2017-03-07 17:11:43 +01:00 committed by Emile Vauge
parent c864d80270
commit f621a46a2e
No known key found for this signature in database
GPG Key ID: D808B4C167352E59

View File

@ -162,7 +162,11 @@ func (provider *Kv) list(keys ...string) []string {
func (provider *Kv) listServers(backend string) []string {
serverNames := provider.list(backend, "/servers/")
return fun.Filter(func(serverName string) bool {
if _, err := provider.kvclient.Get(fmt.Sprint(serverName, "/url")); err != nil {
key := fmt.Sprint(serverName, "/url")
if _, err := provider.kvclient.Get(key); err != nil {
if err != store.ErrKeyNotFound {
log.Errorf("Failed to retrieve value for key %s: %s", key, err)
}
return false
}
return provider.checkConstraints(serverName, "/tags")