From 737d34bc9d2e9e1690d36f3bca4ee755cda11e10 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Tue, 21 Sep 2004 16:07:54 +0000 Subject: [PATCH] Move around some error processing so that a job which can never run gets rejected instead of sticking around in a pending state. --- src/slurmctld/node_scheduler.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 615d1cd1874..7ed2b54312e 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -43,6 +43,7 @@ #include "src/common/xassert.h" #include "src/common/xmalloc.h" #include "src/common/xstring.h" + #include "src/slurmctld/agent.h" #include "src/slurmctld/sched_plugin.h" #include "src/slurmctld/select_plugin.h" @@ -544,12 +545,13 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size, /* The job is not able to start right now, return a * value indicating when the job can start */ + if (!runable_avail) + error_code = ESLURM_REQUESTED_PART_CONFIG_UNAVAILABLE; if (!runable_ever) { error_code = ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE; info("_pick_best_nodes: job never runnable"); } - if (!runable_avail) - error_code = ESLURM_REQUESTED_PART_CONFIG_UNAVAILABLE; + if (error_code == SLURM_SUCCESS) error_code = ESLURM_NODES_BUSY; return error_code; -- GitLab