Skip to content
Snippets Groups Projects
Commit e5c8de12 authored by Morris Jette's avatar Morris Jette
Browse files

Merge branch 'slurm-2.5'

parents 2993b423 2af5ce33
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ documents those changes that are of interest to users and admins.
* Changes in SLURM 2.5.2
========================
-- Fix advanced reservation recovery logic when upgrading from version 2.4.
* Changes in SLURM 2.5.1
========================
......
......@@ -1483,9 +1483,12 @@ extern char *node_state_string(uint16_t inx)
bool power_up_flag = (inx & NODE_STATE_POWER_UP);
if (maint_flag) {
if (no_resp_flag)
if ((base == NODE_STATE_ALLOCATED) ||
(base == NODE_STATE_MIXED))
;
else if (no_resp_flag)
return "MAINT*";
if (base != NODE_STATE_ALLOCATED)
else
return "MAINT";
}
if (drain_flag) {
......@@ -1601,9 +1604,11 @@ extern char *node_state_string_compact(uint16_t inx)
inx = (uint16_t) (inx & NODE_STATE_BASE);
if (maint_flag) {
if (no_resp_flag)
if ((inx == NODE_STATE_ALLOCATED) || (inx == NODE_STATE_MIXED))
;
else if (no_resp_flag)
return "MAINT*";
if (inx != NODE_STATE_ALLOCATED)
else
return "MAINT";
}
if (drain_flag) {
......
......@@ -988,10 +988,18 @@ int _print_size(sinfo_data_t * sinfo_data, int width,
int _print_state_compact(sinfo_data_t * sinfo_data, int width,
bool right_justify, char *suffix)
{
char *upper_state, *lower_state;
uint16_t my_state;
if (sinfo_data && sinfo_data->nodes_total) {
char *upper_state = node_state_string_compact(
sinfo_data->node_state);
char *lower_state = _str_tolower(upper_state);
my_state = sinfo_data->node_state;
if (sinfo_data->cpus_alloc &&
(sinfo_data->cpus_alloc != sinfo_data->cpus_total)) {
my_state &= NODE_STATE_FLAGS;
my_state |= NODE_STATE_MIXED;
}
upper_state = node_state_string_compact(my_state);
lower_state = _str_tolower(upper_state);
_print_str(lower_state, width, right_justify, true);
xfree(lower_state);
} else if (sinfo_data)
......@@ -1007,9 +1015,18 @@ int _print_state_compact(sinfo_data_t * sinfo_data, int width,
int _print_state_long(sinfo_data_t * sinfo_data, int width,
bool right_justify, char *suffix)
{
char *upper_state, *lower_state;
uint16_t my_state;
if (sinfo_data && sinfo_data->nodes_total) {
char *upper_state = node_state_string(sinfo_data->node_state);
char *lower_state = _str_tolower(upper_state);
my_state = sinfo_data->node_state;
if (sinfo_data->cpus_alloc &&
(sinfo_data->cpus_alloc != sinfo_data->cpus_total)) {
my_state &= NODE_STATE_FLAGS;
my_state |= NODE_STATE_MIXED;
}
upper_state = node_state_string(my_state);
lower_state = _str_tolower(upper_state);
_print_str(lower_state, width, right_justify, true);
xfree(lower_state);
} else if (sinfo_data)
......
......@@ -1322,6 +1322,7 @@ slurmctld_resv_t *_load_reservation_state(Buf buffer,
safe_unpack_time(&resv_ptr->start_time, buffer);
safe_unpack8((uint8_t *)&resv_ptr->user_not, buffer);
} else {
resv_ptr->full_nodes = 1; /* Added in v2.5 */
safe_unpackstr_xmalloc(&resv_ptr->accounts,
&uint32_tmp, buffer);
safe_unpack_time(&resv_ptr->end_time, buffer);
......
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