parent
df4fe2e502
commit
8bdb38d016
|
@ -1248,11 +1248,8 @@ func (c *Client) setupConsulSyncer() error {
|
|||
// Nomad servers are available within
|
||||
// datacenterQueryLimit, the next heartbeat will pick
|
||||
// a new set of servers so it's okay.
|
||||
nearestDC := dcs[0]
|
||||
dcs = dcs[1:]
|
||||
shuffleStrings(dcs)
|
||||
otherDCs := dcs[0:lib.MinInt(len(dcs), datacenterQueryLimit)]
|
||||
dcs = append([]string{nearestDC}, otherDCs...)
|
||||
shuffleStrings(dcs[1:])
|
||||
dcs = dcs[0:lib.MinInt(len(dcs), datacenterQueryLimit)]
|
||||
}
|
||||
|
||||
// Forward RPCs to our region
|
||||
|
|
|
@ -469,11 +469,8 @@ func (s *Server) setupBootstrapHandler() error {
|
|||
// are necessary, this Nomad Server will eventually
|
||||
// walk all datacenter until it finds enough hosts to
|
||||
// form a quorum.
|
||||
nearestDC := dcs[0]
|
||||
dcs = dcs[1:]
|
||||
shuffleStrings(dcs)
|
||||
otherDCs := dcs[0:lib.MinInt(len(dcs), datacenterQueryLimit)]
|
||||
dcs = append([]string{nearestDC}, otherDCs...)
|
||||
shuffleStrings(dcs[1:])
|
||||
dcs = dcs[0:lib.MinInt(len(dcs), datacenterQueryLimit)]
|
||||
}
|
||||
|
||||
nomadServerServiceName := s.config.ConsulConfig.ServerServiceName
|
||||
|
|
Loading…
Reference in New Issue