From b105602902e38f18a48505e2091ffea77b2c7c89 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Fri, 25 Jan 2019 16:40:59 -0500 Subject: [PATCH] 14325: Don't count busy workers with state=Unknown as Unallocated. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- lib/dispatchcloud/worker/pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dispatchcloud/worker/pool.go b/lib/dispatchcloud/worker/pool.go index 1665a1e43d..b2d601d461 100644 --- a/lib/dispatchcloud/worker/pool.go +++ b/lib/dispatchcloud/worker/pool.go @@ -204,7 +204,7 @@ func (wp *Pool) Unallocated() map[arvados.InstanceType]int { creating[it] = len(times) } for _, wkr := range wp.workers { - if !(wkr.state == StateIdle || wkr.state == StateBooting || wkr.state == StateUnknown) || wkr.idleBehavior != IdleBehaviorRun { + if !(wkr.state == StateIdle || wkr.state == StateBooting || wkr.state == StateUnknown) || wkr.idleBehavior != IdleBehaviorRun || len(wkr.running) > 0 { continue } it := wkr.instType -- 2.30.2