Fixes configs now that Serf always caches coordinates.

This commit is contained in:
James Phillips 2015-10-21 17:28:33 -07:00
parent 439110f384
commit de01f96d38
3 changed files with 1 additions and 9 deletions

View File

@ -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
}

View File

@ -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

View File

@ -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)
}