Merge pull request #3191 from hashicorp/b-tagged-metrics-panic

Fix panic in emitting tagged allocation metrics
This commit is contained in:
Chelsea Komlo 2017-09-11 14:28:50 -04:00 committed by GitHub
commit 536d38454b
1 changed files with 1 additions and 0 deletions

View File

@ -1940,6 +1940,7 @@ func (c *Client) setGaugeForDiskStats(nodeID string, hStats *stats.HostStats) {
// setGaugeForAllocationStats proxies metrics for allocation specific statistics
func (c *Client) setGaugeForAllocationStats(nodeID string) {
c.configLock.RLock()
node := c.configCopy.Node
c.configLock.RUnlock()
total := node.Resources