Skip to content

Commit

Permalink
-- In slurmctld, properly set the up_node_bitmap when setting it's s…
Browse files Browse the repository at this point in the history
…tate to

    IDLE (in case the previous node state was DOWN).
  • Loading branch information
Moe Jette committed Feb 8, 2011
1 parent c2c75bc commit 510e5c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ documents those changes that are of interest to users and admins.
job is in a pending state, then send the request directly to the slurmctld
daemon and do not attempt to send the request to slurmd daemons, which are
not running the job anyway.
-- In slurmctld, properly set the up_node_bitmap when setting it's state to
IDLE (in case the previous node state was DOWN).

* Changes in SLURM 2.2.1
========================
Expand Down
9 changes: 8 additions & 1 deletion src/slurmctld/node_mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2525,8 +2525,9 @@ void make_node_idle(struct node_record *node_ptr,
(node_ptr->run_job_cnt == 0) &&
(node_ptr->comp_job_cnt == 0)) {
node_ptr->node_state = NODE_STATE_IDLE | node_flags;
bit_set(idle_node_bitmap, inx);
bit_clear(avail_node_bitmap, inx);
bit_set(idle_node_bitmap, inx);
bit_set(up_node_bitmap, inx);
debug3("make_node_idle: Node %s is DRAINED",
node_ptr->name);
node_ptr->last_idle = now;
Expand All @@ -2536,11 +2537,17 @@ void make_node_idle(struct node_record *node_ptr,
slurm_get_slurm_user_id());
} else if (node_ptr->run_job_cnt) {
node_ptr->node_state = NODE_STATE_ALLOCATED | node_flags;
if (!IS_NODE_NO_RESPOND(node_ptr))
bit_set(avail_node_bitmap, inx);
bit_set(up_node_bitmap, inx);
} else {
node_ptr->node_state = NODE_STATE_IDLE | node_flags;
if (!IS_NODE_NO_RESPOND(node_ptr))
bit_set(avail_node_bitmap, inx);
if (!IS_NODE_NO_RESPOND(node_ptr) &&
!IS_NODE_COMPLETING(node_ptr))
bit_set(idle_node_bitmap, inx);
bit_set(up_node_bitmap, inx);
node_ptr->last_idle = now;
}
}
Expand Down

0 comments on commit 510e5c7

Please sign in to comment.