mirror of https://github.com/status-im/consul.git
Fixes configs now that Serf always caches coordinates.
This commit is contained in:
parent
439110f384
commit
de01f96d38
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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…
Reference in New Issue