consul: gossip role includes rpc addr

This commit is contained in:
Armon Dadgar 2013-12-09 14:30:16 -08:00
parent c28ebbf60f
commit b7bafb6bd8
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ func (s *Server) ensurePath(path string, dir bool) error {
// setupSerf is used to setup and initialize a Serf
func (s *Server) setupSerf(conf *serf.Config, ch chan serf.Event, path string) (*serf.Serf, error) {
conf.NodeName = s.config.NodeName
conf.Role = fmt.Sprintf("consul:%s", s.config.Datacenter)
conf.Role = fmt.Sprintf("consul:%s:%s", s.config.Datacenter, s.rpcListener.Addr().String())
conf.MemberlistConfig.LogOutput = s.config.LogOutput
conf.LogOutput = s.config.LogOutput
conf.EventCh = ch