X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7c013f919b5db9336833dbe855349600449a993d..a992f644b8f34203d0a8133af829e4c84c2c4174:/lib/dispatchcloud/scheduler/run_queue.go diff --git a/lib/dispatchcloud/scheduler/run_queue.go b/lib/dispatchcloud/scheduler/run_queue.go index 1e5ac2e046..dda3630ee7 100644 --- a/lib/dispatchcloud/scheduler/run_queue.go +++ b/lib/dispatchcloud/scheduler/run_queue.go @@ -84,6 +84,8 @@ func (sch *Scheduler) runQueue() { // reaches the dynamic maxConcurrency limit. trying := len(running) + supervisors := 0 + tryrun: for i, ctr := range sorted { ctr, it := ctr.Container, ctr.InstanceType @@ -91,6 +93,12 @@ tryrun: "ContainerUUID": ctr.UUID, "InstanceType": it.Name, }) + if ctr.SchedulingParameters.Supervisor { + supervisors += 1 + if sch.maxSupervisors > 0 && supervisors > sch.maxSupervisors { + continue + } + } if _, running := running[ctr.UUID]; running || ctr.Priority < 1 { continue } @@ -177,7 +185,7 @@ tryrun: _, toolate := running[ctr.UUID] if ctr.State == arvados.ContainerStateLocked && !toolate { logger := sch.logger.WithField("ContainerUUID", ctr.UUID) - logger.Debug("unlock because pool capacity is used by higher priority containers") + logger.Info("unlock because pool capacity is used by higher priority containers") err := sch.queue.Unlock(ctr.UUID) if err != nil { logger.WithError(err).Warn("error unlocking")