Merge pull request #1069 from hashicorp/fix-read-node-attr

Fix read node attr
This commit is contained in:
Alex Dadgar
2016-04-11 18:42:32 -07:00
3 changed files with 7 additions and 2 deletions

2
Vagrantfile vendored
View File

@@ -42,7 +42,7 @@ source /etc/profile.d/gopath.sh
echo Fetching Consul...
cd /tmp/
wget https://releases.hashicorp.com/consul/0.6.0/consul_0.6.0_linux_amd64.zip -O consul.zip
wget https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip -O consul.zip
echo Installing Consul...
unzip consul.zip
sudo chmod +x consul

View File

@@ -1192,7 +1192,11 @@ func (c *Client) syncConsul() {
select {
case <-sync.C:
// Give up pruning services if we can't fingerprint Consul
if _, ok := c.config.Node.Attributes["consul.server"]; !ok {
c.configLock.RLock()
_, ok := c.configCopy.Node.Attributes["consul.server"]
c.configLock.RUnlock()
if !ok {
continue
}
services := make(map[string]struct{})

1
vendor/github.com/logrus generated vendored Submodule

Submodule vendor/github.com/logrus added at 4b6ea7319e