cluster: pass resolved peers to Join()

This commit is contained in:
Simon Pasquier 2018-02-13 16:48:41 +01:00
parent 8eb8c1baa0
commit f4c81c43e9
1 changed files with 6 additions and 2 deletions

View File

@ -117,8 +117,12 @@ func Join(
}
p.mlist = ml
n, _ := ml.Join(knownPeers)
level.Debug(l).Log("msg", "joined cluster", "peers", n)
n, err := ml.Join(resolvedPeers)
if err != nil {
level.Warn(l).Log("msg", "failed to join cluster", "err", err)
} else {
level.Debug(l).Log("msg", "joined cluster", "peers", n)
}
if n > 0 {
go p.warnIfAlone(l, 10*time.Second)