Skip to content
Snippets Groups Projects
Commit fc9eaad6 authored by Danny Auble's avatar Danny Auble
Browse files

Merge remote-tracking branch 'origin/slurm-2.6' into slurm-14.03

parents 3b2f7187 2fb004cf
No related branches found
No related tags found
No related merge requests found
...@@ -310,6 +310,8 @@ documents those changes that are of interest to users and admins. ...@@ -310,6 +310,8 @@ documents those changes that are of interest to users and admins.
* Changes in Slurm 2.6.9 * Changes in Slurm 2.6.9
======================== ========================
-- Fix sinfo to work correctly with draining/mixed nodes as well as filtering
on Mixed state.
* Changes in Slurm 2.6.8 * Changes in Slurm 2.6.8
======================== ========================
......
...@@ -995,16 +995,6 @@ int _print_state_compact(sinfo_data_t * sinfo_data, int width, ...@@ -995,16 +995,6 @@ int _print_state_compact(sinfo_data_t * sinfo_data, int width,
if (sinfo_data && sinfo_data->nodes_total) { if (sinfo_data && sinfo_data->nodes_total) {
my_state = sinfo_data->node_state; my_state = sinfo_data->node_state;
if (IS_NODE_DRAIN(sinfo_data)) {
/* don't worry about mixed since the
* whole node is being drained. */
} else if ((sinfo_data->cpus_alloc && sinfo_data->cpus_other)
|| (sinfo_data->cpus_idle
&& (sinfo_data->cpus_idle
!= sinfo_data->cpus_total))) {
my_state &= NODE_STATE_FLAGS;
my_state |= NODE_STATE_MIXED;
}
upper_state = node_state_string_compact(my_state); upper_state = node_state_string_compact(my_state);
lower_state = _str_tolower(upper_state); lower_state = _str_tolower(upper_state);
......
...@@ -258,6 +258,8 @@ _query_server(partition_info_msg_t ** part_pptr, ...@@ -258,6 +258,8 @@ _query_server(partition_info_msg_t ** part_pptr,
static reserve_info_msg_t *old_resv_ptr = NULL, *new_resv_ptr; static reserve_info_msg_t *old_resv_ptr = NULL, *new_resv_ptr;
int error_code; int error_code;
uint16_t show_flags = 0; uint16_t show_flags = 0;
int cc;
node_info_t *node_ptr;
if (params.all_flag) if (params.all_flag)
show_flags |= SHOW_ALL; show_flags |= SHOW_ALL;
...@@ -317,6 +319,46 @@ _query_server(partition_info_msg_t ** part_pptr, ...@@ -317,6 +319,46 @@ _query_server(partition_info_msg_t ** part_pptr,
old_node_ptr = new_node_ptr; old_node_ptr = new_node_ptr;
*node_pptr = new_node_ptr; *node_pptr = new_node_ptr;
/* Set the node state as NODE_STATE_MIXED. */
for (cc = 0; cc < new_node_ptr->record_count; cc++) {
node_ptr = &(new_node_ptr->node_array[cc]);
if (IS_NODE_DRAIN(node_ptr)) {
/* don't worry about mixed since the
* whole node is being drained. */
} else {
uint16_t alloc_cpus = 0, err_cpus = 0, idle_cpus;
int single_node_cpus =
(node_ptr->cpus / g_node_scaling);
select_g_select_nodeinfo_get(node_ptr->select_nodeinfo,
SELECT_NODEDATA_SUBCNT,
NODE_STATE_ALLOCATED,
&alloc_cpus);
if (params.cluster_flags & CLUSTER_FLAG_BG) {
if (!alloc_cpus &&
(IS_NODE_ALLOCATED(node_ptr) ||
IS_NODE_COMPLETING(node_ptr)))
alloc_cpus = node_ptr->cpus;
else
alloc_cpus *= single_node_cpus;
}
idle_cpus = node_ptr->cpus - alloc_cpus;
select_g_select_nodeinfo_get(node_ptr->select_nodeinfo,
SELECT_NODEDATA_SUBCNT,
NODE_STATE_ERROR,
&err_cpus);
if (params.cluster_flags & CLUSTER_FLAG_BG)
err_cpus *= single_node_cpus;
idle_cpus -= err_cpus;
if ((alloc_cpus && err_cpus) ||
(idle_cpus && (idle_cpus != node_ptr->cpus))) {
node_ptr->node_state &= NODE_STATE_FLAGS;
node_ptr->node_state |= NODE_STATE_MIXED;
}
}
}
if (old_resv_ptr) { if (old_resv_ptr) {
if (clear_old) if (clear_old)
old_resv_ptr->last_update = 0; old_resv_ptr->last_update = 0;
......
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