mirror of https://github.com/status-im/consul.git
consul: Do not override the node address
This commit is contained in:
parent
419447d9f7
commit
779ae5ca0d
|
@ -832,9 +832,6 @@ func (s *StateStore) parseServiceNodes(tx *MDBTxn, table *MDBTable, res []interf
|
||||||
for i, r := range res {
|
for i, r := range res {
|
||||||
srv := r.(*structs.ServiceNode)
|
srv := r.(*structs.ServiceNode)
|
||||||
|
|
||||||
if srv.ServiceAddress != "" {
|
|
||||||
srv.Address = srv.ServiceAddress
|
|
||||||
} else {
|
|
||||||
// Get the address of the node
|
// Get the address of the node
|
||||||
nodeRes, err := table.GetTxn(tx, "id", srv.Node)
|
nodeRes, err := table.GetTxn(tx, "id", srv.Node)
|
||||||
if err != nil || len(nodeRes) != 1 {
|
if err != nil || len(nodeRes) != 1 {
|
||||||
|
@ -842,7 +839,6 @@ func (s *StateStore) parseServiceNodes(tx *MDBTxn, table *MDBTable, res []interf
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
srv.Address = nodeRes[0].(*structs.Node).Address
|
srv.Address = nodeRes[0].(*structs.Node).Address
|
||||||
}
|
|
||||||
|
|
||||||
nodes[i] = *srv
|
nodes[i] = *srv
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue