cluster: log error on reconnect failures (#2260)

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
Simon Pasquier 2020-05-18 15:00:51 +02:00 committed by GitHub
parent 013177e2d0
commit de80d907d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -405,7 +405,7 @@ func (p *Peer) reconnect() {
// peerJoin(). // peerJoin().
if _, err := p.mlist.Join([]string{pr.Address()}); err != nil { if _, err := p.mlist.Join([]string{pr.Address()}); err != nil {
p.failedReconnectionsCounter.Inc() p.failedReconnectionsCounter.Inc()
level.Debug(logger).Log("result", "failure", "peer", pr.Node, "addr", pr.Address()) level.Debug(logger).Log("result", "failure", "peer", pr.Node, "addr", pr.Address(), "err", err)
} else { } else {
p.reconnectionsCounter.Inc() p.reconnectionsCounter.Inc()
level.Debug(logger).Log("result", "success", "peer", pr.Node, "addr", pr.Address()) level.Debug(logger).Log("result", "success", "peer", pr.Node, "addr", pr.Address())
@ -435,7 +435,7 @@ func (p *Peer) refresh() {
if !isPeerFound { if !isPeerFound {
if _, err := p.mlist.Join([]string{peer}); err != nil { if _, err := p.mlist.Join([]string{peer}); err != nil {
p.failedRefreshCounter.Inc() p.failedRefreshCounter.Inc()
level.Warn(logger).Log("result", "failure", "addr", peer) level.Warn(logger).Log("result", "failure", "addr", peer, "err", err)
} else { } else {
p.refreshCounter.Inc() p.refreshCounter.Inc()
level.Debug(logger).Log("result", "success", "addr", peer) level.Debug(logger).Log("result", "success", "addr", peer)