From 54b258ecdab603678f2bc4a134fa58b533d2e25e Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Tue, 14 Jul 2015 15:54:15 -0700 Subject: [PATCH] Prevent backfill scheduler overriding job hold The backfill scheduler will periodically release locks for other actions. If a job is held during the time that locks were released, that job might still have been scheduled by the backfill scheduler (i.e. it failed to check for a job with a priority of zero). could be a root cause for bug 1750 --- src/plugins/sched/backfill/backfill.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c index eb483879e5d..98e566f60cb 100644 --- a/src/plugins/sched/backfill/backfill.c +++ b/src/plugins/sched/backfill/backfill.c @@ -904,8 +904,9 @@ next_task: slurmctld_diag_stats.bf_last_depth++; already_counted = false; - if (!IS_JOB_PENDING(job_ptr)) - continue; /* started in another partition */ + if (!IS_JOB_PENDING(job_ptr) || /* Started in other part*/ + (job_ptr->priority == 0)) /* Job has been held */ + continue; if (job_ptr->preempt_in_progress) continue; /* scheduled in another partition */ if (!avail_front_end(job_ptr)) @@ -1098,7 +1099,8 @@ next_task: if ((job_ptr->magic != JOB_MAGIC) || (job_ptr->job_id != save_job_id)) continue; - if (!IS_JOB_PENDING(job_ptr)) + if (!IS_JOB_PENDING(job_ptr) || /* Already started */ + (job_ptr->priority == 0)) /* Job has been held */ continue; if (!avail_front_end(job_ptr)) continue; /* No available frontend */ -- GitLab