mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #1362 from philips/consistent-hex-use
etcdserver: use hex for cluster and machine id
This commit is contained in:
commit
2cb8efb9b5
@ -254,7 +254,7 @@ func (h serverHandler) serveRaft(w http.ResponseWriter, r *http.Request) {
|
|||||||
http.Error(w, "error unmarshaling raft message", http.StatusBadRequest)
|
http.Error(w, "error unmarshaling raft message", http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Printf("etcdhttp: raft recv message from %#x: %+v", m.From, m)
|
log.Printf("etcdhttp: raft recv message from %x: %+v", m.From, m)
|
||||||
if err := h.server.Process(context.TODO(), m); err != nil {
|
if err := h.server.Process(context.TODO(), m); err != nil {
|
||||||
log.Println("etcdhttp: error processing raft message:", err)
|
log.Println("etcdhttp: error processing raft message:", err)
|
||||||
switch err {
|
switch err {
|
||||||
|
@ -683,7 +683,7 @@ func restartNode(cfg *ServerConfig, index uint64, snapshot *raftpb.Snapshot) (id
|
|||||||
var metadata pb.Metadata
|
var metadata pb.Metadata
|
||||||
pbutil.MustUnmarshal(&metadata, wmetadata)
|
pbutil.MustUnmarshal(&metadata, wmetadata)
|
||||||
id, cid = metadata.NodeID, metadata.ClusterID
|
id, cid = metadata.NodeID, metadata.ClusterID
|
||||||
log.Printf("etcdserver: restart node %d in cluster %d at commit index %d", id, cid, st.Commit)
|
log.Printf("etcdserver: restart member %x in cluster %x at commit index %d", id, cid, st.Commit)
|
||||||
n = raft.RestartNode(id, 10, 1, snapshot, st, ents)
|
n = raft.RestartNode(id, 10, 1, snapshot, st, ents)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user