Browse Source

Fixes configs now that Serf always caches coordinates.

pull/1331/head
James Phillips 9 years ago
parent
commit
de01f96d38
  1. 1
      consul/client.go
  2. 4
      consul/config.go
  3. 5
      consul/server.go

1
consul/client.go

@ -140,7 +140,6 @@ func (c *Client) setupSerf(conf *serf.Config, ch chan serf.Event, path string) (
conf.RejoinAfterLeave = c.config.RejoinAfterLeave
conf.Merge = &lanMergeDelegate{dc: c.config.Datacenter}
conf.DisableCoordinates = c.config.DisableCoordinates
conf.CacheCoordinates = false
if err := ensurePath(conf.SnapshotPath, false); err != nil {
return nil, err
}

4
consul/config.go

@ -297,10 +297,6 @@ func DefaultConfig() *Config {
conf.SerfLANConfig.MemberlistConfig.BindPort = DefaultLANSerfPort
conf.SerfWANConfig.MemberlistConfig.BindPort = DefaultWANSerfPort
// Cache coordinates for the WAN since the number of servers is small,
// and because we don't store these in the database.
conf.SerfWANConfig.CacheCoordinates = true
// Disable shutdown on removal
conf.RaftConfig.ShutdownOnRemove = false

5
consul/server.go

@ -317,11 +317,8 @@ func (s *Server) setupSerf(conf *serf.Config, ch chan serf.Event, path string, w
return nil, err
}
// Let Serf cache coordinates for only the WAN configuration where the
// number of nodes should be small, and where we serve these directly
// from Serf because they aren't managed in the catalog.
// Plumb down the enable coordinates flag.
conf.DisableCoordinates = s.config.DisableCoordinates
conf.CacheCoordinates = wan
return serf.Create(conf)
}

Loading…
Cancel
Save