cluster: log error on reconnect failures (#2260)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
013177e2d0
commit
de80d907d1
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue