Merge pull request #5541 from hashicorp/b/5540-bad-client-alloc-metrics

client/metrics: fixed stale metrics
This commit is contained in:
Chris Baker
2019-04-22 15:07:30 -04:00
committed by GitHub

View File

@@ -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():