From 79ac8424f0ac0ce8bfe7d85e8423e18a44e8c9cf Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Tue, 1 Oct 2024 10:46:19 -0400 Subject: [PATCH] 22132: Better messages WIP Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- lib/dispatchcloud/scheduler/run_queue.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/dispatchcloud/scheduler/run_queue.go b/lib/dispatchcloud/scheduler/run_queue.go index d270972295..0979f9c83d 100644 --- a/lib/dispatchcloud/scheduler/run_queue.go +++ b/lib/dispatchcloud/scheduler/run_queue.go @@ -25,9 +25,9 @@ type QueueEnt struct { } const ( - schedStatusPreparingRuntimeEnvironment = "preparing runtime environment" - schedStatusPriorityZero = "not scheduling: priority 0" // ", state X" appended at runtime - schedStatusContainerLimitReached = "not starting: supervisor container limit has been reached" + schedStatusPreparingRuntimeEnvironment = "An instance has been allocated and Crunch is now preparing to run the container." + schedStatusPriorityZero = "This container will not be scheduled because its priority is 0 and state is %v." + schedStatusSupervisorLimitReached = "The cluster is at capacity, this workflow has position %v in the workflow queue." schedStatusWaitingForPreviousAttempt = "waiting for previous attempt to exit" schedStatusWaitingNewInstance = "waiting for new instance to be ready" schedStatusWaitingInstanceType = "waiting for suitable instance type to become available" // ": queue position X" appended at runtime @@ -204,12 +204,12 @@ tryrun: continue } if ctr.Priority < 1 { - sorted[i].SchedulingStatus = schedStatusPriorityZero + ", state " + string(ctr.State) + sorted[i].SchedulingStatus = fmt.Sprintf(schedStatusPriorityZero, string(ctr.State)) continue } if ctr.SchedulingParameters.Supervisor && maxSupervisors > 0 && supervisors > maxSupervisors { overmaxsuper = append(overmaxsuper, sorted[i]) - sorted[i].SchedulingStatus = schedStatusContainerLimitReached + sorted[i].SchedulingStatus = fmt.Sprintf(schedStatusSupervisorLimitReached, len(overmaxsuper)) continue } // If we have unalloc instances of any of the eligible -- 2.30.2