From e92b49d3f4b7b0de049d59bb1669de7dea5c2ae0 Mon Sep 17 00:00:00 2001
From: Dominik Bartkiewicz <bart@schedmd.com>
Date: Tue, 17 Jan 2017 14:46:07 -0700
Subject: [PATCH] Require the normal scheduler to set/clear an Assoc/QOS limit
 on a job instead of also in the backfill scheduler.

---
 NEWS                                  | 2 ++
 src/plugins/sched/backfill/backfill.c | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 213e39085b2..275ffbd6bc3 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,8 @@ documents those changes that are of interest to users and administrators.
  -- Fix missing TRES read lock in acct_policy_job_runnable_pre_select() code.
  -- Fix debug2 message printing value using wrong array index in
     _qos_job_runnable_post_select().
+ -- Require the normal scheduler to set/clear an Assoc/QOS limit on a job
+    instead of also in the backfill scheduler.
 
 * Changes in Slurm 16.05.8
 ==========================
diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c
index 2cf7ea871d0..d1300fe85e8 100644
--- a/src/plugins/sched/backfill/backfill.c
+++ b/src/plugins/sched/backfill/backfill.c
@@ -1126,8 +1126,10 @@ static int _attempt_backfill(void)
 			continue;
 		}
 
-		if (!acct_policy_job_runnable_state(job_ptr) &&
-		    !acct_policy_job_runnable_pre_select(job_ptr))
+		/* If the job is held with an assoc/qos limit let the regular
+		 * scheduler handle it.
+		 */
+		if (!acct_policy_job_runnable_state(job_ptr))
 			continue;
 
 		job_no_reserve = 0;
-- 
GitLab