Skip to content
Snippets Groups Projects
Commit 9d302348 authored by Moe Jette's avatar Moe Jette
Browse files

Modify job step allocation logic to return ESLURM_NODE_NOT_AVAIL rather than

ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE when slurmctld has restarted and 
nodes have not yet registered (in unknown state).
parent 804f00ce
No related branches found
No related tags found
No related merge requests found
...@@ -848,10 +848,12 @@ _pick_step_nodes (struct job_record *job_ptr, ...@@ -848,10 +848,12 @@ _pick_step_nodes (struct job_record *job_ptr,
if (node_tmp == NULL) { if (node_tmp == NULL) {
if (step_spec->min_nodes <= if (step_spec->min_nodes <=
(bit_set_count(nodes_avail) + (bit_set_count(nodes_avail) +
nodes_picked_cnt + nodes_picked_cnt + mem_blocked_nodes)) {
mem_blocked_nodes)) {
*return_code = *return_code =
ESLURM_INVALID_TASK_MEMORY; ESLURM_INVALID_TASK_MEMORY;
} else if (!bit_super_set(job_ptr->node_bitmap,
up_node_bitmap)) {
*return_code = ESLURM_NODE_NOT_AVAIL;
} }
goto cleanup; goto cleanup;
} }
...@@ -895,9 +897,13 @@ _pick_step_nodes (struct job_record *job_ptr, ...@@ -895,9 +897,13 @@ _pick_step_nodes (struct job_record *job_ptr,
/* user is requesting more cpus than we got from the /* user is requesting more cpus than we got from the
* picked nodes we should return with an error */ * picked nodes we should return with an error */
if (step_spec->cpu_count > cpus_picked_cnt) { if (step_spec->cpu_count > cpus_picked_cnt) {
if (step_spec->cpu_count <= if (step_spec->cpu_count &&
(cpus_picked_cnt + mem_blocked_cpus)) { (step_spec->cpu_count <=
(cpus_picked_cnt + mem_blocked_cpus))) {
*return_code = ESLURM_INVALID_TASK_MEMORY; *return_code = ESLURM_INVALID_TASK_MEMORY;
} else if (!bit_super_set(job_ptr->node_bitmap,
up_node_bitmap)) {
*return_code = ESLURM_NODE_NOT_AVAIL;
} }
debug2("Have %d nodes with %d cpus which is less " debug2("Have %d nodes with %d cpus which is less "
"than what the user is asking for (%d cpus) " "than what the user is asking for (%d cpus) "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment