Commit 7dcde848 authored by Morris Jette's avatar Morris Jette
Browse files

Job's --time-min used when not needed

This bug was observed once running test1.103 and found to be
reproducible under some circumstances. How this works is when
a job is submitted with a --time-min value, then the backfill
scheduler set's the job's time limit to that value (see below),
tries to start it, and if successful then set the time limit to
the largest value possible without delaying the expected start
time of any higher priority jobs. If the job can't be started,
the job's (maximum) time limit is supposed to be restored to
its previous value. That was happening in some, but not all
places in the code. This patch rests the time limit in the missing
cases.

Note: The job's time limit is set to the --time-min value here:
diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c
index 5600495e1d..e22a810394 100644
--- a/src/plugins/sched/backfill/backfill.c
+++ b/src/plugins/sched/backfill/backfill.c
@@ -1930,7 +1930,7 @@ next_task:
 		    slurm_get_preempt_mode())
 			time_limit = job_ptr->time_limit = 1;
 		else if (job_ptr->time_min && (job_ptr->time_min < time_limit))
-			time_limit = job_ptr->time_limit = job_ptr->time_min;
+			time_limit = job_ptr->time_limit = job_ptr->time_min;		// SET HERE

 		later_start = now;
parent f1837a40
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment