Client not syncing services with consul until fingerprinting succeeds

This commit is contained in:
Diptanu Choudhury
2016-03-30 21:51:50 -07:00
parent 090653051d
commit bea0560234

View File

@@ -1184,6 +1184,10 @@ func (c *Client) syncConsul() {
for {
select {
case <-sync.C:
// Give up pruning services if we can't fingerprint Consul
if _, ok := c.config.Node.Attributes["consul.server"]; !ok {
continue
}
services := make(map[string]struct{})
// Get the existing allocs
c.allocLock.RLock()