Merge pull request #1298 from hashicorp/b-auto-join

Only auto-join clients if `client_auto_join` is true
This commit is contained in:
Sean Chittenden 2016-06-16 14:48:27 -07:00 committed by GitHub
commit 0420c29f3b
1 changed files with 3 additions and 1 deletions

View File

@ -1349,7 +1349,9 @@ func (c *Client) setupConsulSyncer() error {
return nil
}
c.consulSyncer.AddPeriodicHandler("Nomad Client Fallback Server Handler", bootstrapFn)
if c.config.ConsulConfig.ClientAutoJoin {
c.consulSyncer.AddPeriodicHandler("Nomad Client Fallback Server Handler", bootstrapFn)
}
consulServicesReaperFn := func() error {
const estInitialExecutorDomains = 8