Use idiomatic name for wan_addr serf tag

pull/1698/head
Evan Gilman 9 years ago committed by James Phillips
parent ed8a71efd7
commit 069a28b3c0

@ -182,7 +182,7 @@ func (c *Client) setupSerf(conf *serf.Config, ch chan serf.Event, path string) (
conf.Merge = &lanMergeDelegate{dc: c.config.Datacenter}
conf.DisableCoordinates = c.config.DisableCoordinates
if wanAddr := c.config.SerfWANConfig.MemberlistConfig.AdvertiseAddr; wanAddr != "" {
conf.Tags["WanAddr"] = wanAddr
conf.Tags["wan_addr"] = wanAddr
}
if err := ensurePath(conf.SnapshotPath, false); err != nil {
return nil, err

@ -381,7 +381,7 @@ func (s *Server) handleAliveMember(member serf.Member) error {
}
if node != nil && node.Address == member.Addr.String() {
// Check if the WAN address was updated
if node.WanAddress != member.Tags["WanAddr"] {
if node.WanAddress != member.Tags["wan_addr"] {
goto AFTER_CHECK
}
@ -423,7 +423,7 @@ AFTER_CHECK:
Datacenter: s.config.Datacenter,
Node: member.Name,
Address: member.Addr.String(),
WanAddress: member.Tags["WanAddr"],
WanAddress: member.Tags["wan_addr"],
Service: service,
Check: &structs.HealthCheck{
Node: member.Name,
@ -466,7 +466,7 @@ func (s *Server) handleFailedMember(member serf.Member) error {
Datacenter: s.config.Datacenter,
Node: member.Name,
Address: member.Addr.String(),
WanAddress: member.Tags["WanAddr"],
WanAddress: member.Tags["wan_addr"],
Check: &structs.HealthCheck{
Node: member.Name,
CheckID: SerfCheckID,

@ -300,7 +300,7 @@ func (s *Server) setupSerf(conf *serf.Config, ch chan serf.Event, path string, w
conf.Tags["expect"] = fmt.Sprintf("%d", s.config.BootstrapExpect)
}
if wanAddr := s.config.SerfWANConfig.MemberlistConfig.AdvertiseAddr; wanAddr != "" {
conf.Tags["WanAddr"] = wanAddr
conf.Tags["wan_addr"] = wanAddr
}
conf.MemberlistConfig.LogOutput = s.config.LogOutput
conf.LogOutput = s.config.LogOutput

Loading…
Cancel
Save