From e5423707b3e05110b67de9c286b1fcfdcc65113f Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Fri, 24 Jul 2020 15:47:31 -0400 Subject: [PATCH] 16631: Don't start new containers on nodes in hold/drain state. 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 7f1e4bc4b2..79af5a0cb3 100644 --- a/lib/dispatchcloud/worker/pool.go +++ b/lib/dispatchcloud/worker/pool.go @@ -494,7 +494,7 @@ func (wp *Pool) StartContainer(it arvados.InstanceType, ctr arvados.Container) b defer wp.mtx.Unlock() var wkr *worker for _, w := range wp.workers { - if w.instType == it && w.state == StateIdle { + if w.instType == it && w.state == StateIdle && w.idleBehavior == IdleBehaviorRun { if wkr == nil || w.busy.After(wkr.busy) { wkr = w } -- 2.30.2