Pulls in Serf logger fix.

pull/3076/head
James Phillips 2017-05-25 22:02:09 -07:00
parent 7a5626230e
commit 1021a62ddc
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
2 changed files with 7 additions and 8 deletions

View File

@ -2,7 +2,6 @@ package serf
import ( import (
"bytes" "bytes"
"log"
"time" "time"
"github.com/armon/go-metrics" "github.com/armon/go-metrics"
@ -37,7 +36,7 @@ func (p *pingDelegate) AckPayload() []byte {
// The rest of the message is the serialized coordinate. // The rest of the message is the serialized coordinate.
enc := codec.NewEncoder(&buf, &codec.MsgpackHandle{}) enc := codec.NewEncoder(&buf, &codec.MsgpackHandle{})
if err := enc.Encode(p.serf.coordClient.GetCoordinate()); err != nil { if err := enc.Encode(p.serf.coordClient.GetCoordinate()); err != nil {
log.Printf("[ERR] serf: Failed to encode coordinate: %v\n", err) p.serf.logger.Printf("[ERR] serf: Failed to encode coordinate: %v\n", err)
} }
return buf.Bytes() return buf.Bytes()
} }
@ -52,7 +51,7 @@ func (p *pingDelegate) NotifyPingComplete(other *memberlist.Node, rtt time.Durat
// Verify ping version in the header. // Verify ping version in the header.
version := payload[0] version := payload[0]
if version != PingVersion { if version != PingVersion {
log.Printf("[ERR] serf: Unsupported ping version: %v", version) p.serf.logger.Printf("[ERR] serf: Unsupported ping version: %v", version)
return return
} }
@ -61,7 +60,7 @@ func (p *pingDelegate) NotifyPingComplete(other *memberlist.Node, rtt time.Durat
dec := codec.NewDecoder(r, &codec.MsgpackHandle{}) dec := codec.NewDecoder(r, &codec.MsgpackHandle{})
var coord coordinate.Coordinate var coord coordinate.Coordinate
if err := dec.Decode(&coord); err != nil { if err := dec.Decode(&coord); err != nil {
log.Printf("[ERR] serf: Failed to decode coordinate from ping: %v", err) p.serf.logger.Printf("[ERR] serf: Failed to decode coordinate from ping: %v", err)
return return
} }
@ -69,7 +68,7 @@ func (p *pingDelegate) NotifyPingComplete(other *memberlist.Node, rtt time.Durat
before := p.serf.coordClient.GetCoordinate() before := p.serf.coordClient.GetCoordinate()
after, err := p.serf.coordClient.Update(other.Name, &coord, rtt) after, err := p.serf.coordClient.Update(other.Name, &coord, rtt)
if err != nil { if err != nil {
log.Printf("[ERR] serf: Rejected coordinate from %s: %v\n", p.serf.logger.Printf("[ERR] serf: Rejected coordinate from %s: %v\n",
other.Name, err) other.Name, err)
return return
} }

6
vendor/vendor.json vendored
View File

@ -675,11 +675,11 @@
"revisionTime": "2017-05-25T23:15:04Z" "revisionTime": "2017-05-25T23:15:04Z"
}, },
{ {
"checksumSHA1": "cOk2eJmnkqSyA0utcLlzWMFDwXg=", "checksumSHA1": "ZkJRgexeNzNZzpw6YnedwoJl7pE=",
"comment": "v0.7.0-66-g6c4672d", "comment": "v0.7.0-66-g6c4672d",
"path": "github.com/hashicorp/serf/serf", "path": "github.com/hashicorp/serf/serf",
"revision": "c2e4be24cdc9031eb0ad869c5d160775efdf7d7a", "revision": "dfab144618a063232d5753eaa4250a09865106c5",
"revisionTime": "2017-05-25T23:15:04Z" "revisionTime": "2017-05-26T05:01:28Z"
}, },
{ {
"checksumSHA1": "ZhK6IO2XN81Y+3RAjTcVm1Ic7oU=", "checksumSHA1": "ZhK6IO2XN81Y+3RAjTcVm1Ic7oU=",