From 7d8fa4c04543e4ade966829378797448cea9008b Mon Sep 17 00:00:00 2001 From: Chris Baker Date: Wed, 10 Apr 2019 19:02:35 +0000 Subject: [PATCH] client/metrics: modified metrics to use (updated) client copy of allocation instead of (unupdated) server copy --- client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index 6b66bd5a31b5..643cfec3cbcb 100644 --- a/client/client.go +++ b/client/client.go @@ -2638,7 +2638,7 @@ func (c *Client) emitClientMetrics() { // Emit allocation metrics blocked, migrating, pending, running, terminal := 0, 0, 0, 0, 0 for _, ar := range c.getAllocRunners() { - switch ar.Alloc().ClientStatus { + switch ar.AllocState().ClientStatus { case structs.AllocClientStatusPending: switch { case ar.IsWaiting():