Walk the DCs from nearest to most remote, no limit on the search.

This commit is contained in:
Sean Chittenden 2016-06-11 18:23:06 -04:00
parent 917766a3df
commit 2968545201
No known key found for this signature in database
GPG key ID: 4EBC9DC16C2E5E16

View file

@ -1291,10 +1291,6 @@ func (c *Client) setupConsulSyncer() error {
if err != nil {
return fmt.Errorf("client.consul: unable to query Consul datacenters: %v", err)
}
dcs = dcs[0:lib.MinInt(len(dcs), datacenterQueryLimit)]
// Walk the list of Consul datacenters randomly in order to
// search for the Nomad server service.
shuffleStrings(dcs)
nomadServerServiceName := c.config.ConsulConfig.ServerServiceName
var mErr multierror.Error