Problem
When a job specifies -w <node> targeting a non-existent or unavailable node (or -x excludes all candidates), the pending reason shown in squeue is (Priority). Slurm shows (ReqNodeNotAvail, May be reserved for other job) or similar, which tells the user exactly why the job is stuck.
Confirmed on testbed
$ spur sbatch -w nonexistent-node job.sh
Submitted batch job 14
$ spur squeue
JOBID STATE NODELIST(REASON)
14 PENDING (Priority)
Slurm would show (ReqNodeNotAvail...).
Proposed approach
The scheduler (or the controller's job-state tracking) needs to distinguish "no suitable nodes exist given constraints" from "nodes exist but are busy". When find_suitable_nodes() returns empty and a nodelist/exclude constraint is set, the pending reason should be set to ReqNodeNotAvail rather than the generic Priority.
Acceptance criteria
Problem
When a job specifies
-w <node>targeting a non-existent or unavailable node (or-xexcludes all candidates), the pending reason shown insqueueis(Priority). Slurm shows(ReqNodeNotAvail, May be reserved for other job)or similar, which tells the user exactly why the job is stuck.Confirmed on testbed
Slurm would show
(ReqNodeNotAvail...).Proposed approach
The scheduler (or the controller's job-state tracking) needs to distinguish "no suitable nodes exist given constraints" from "nodes exist but are busy". When
find_suitable_nodes()returns empty and a nodelist/exclude constraint is set, the pending reason should be set toReqNodeNotAvailrather than the genericPriority.Acceptance criteria
squeueshows(ReqNodeNotAvail)when-wtargets unavailable/non-existent nodessqueueshows(ReqNodeNotAvail)when-xexcludes all candidates-w/-xstill show(Priority)or other appropriate reasons