diff --git a/NEWS b/NEWS index bb941d0e8fd595fb287265883b843806f8ccb37e..c0d1a1ccc8a09719ddbd65b83ca19e6dbfbd086e 100644 --- a/NEWS +++ b/NEWS @@ -236,6 +236,8 @@ documents those changes that are of interest to users and administrators. -- Fix version issue when packing GRES information between 2 different versions of Slurm. -- Fix for srun hanging with OpenMPI and PMIx + -- Better initialization of node_ptr when dealing with protocol_version. + -- Fix incorrect type when initializing header of a message. * Changes in Slurm 15.08.10 =========================== diff --git a/src/common/node_conf.c b/src/common/node_conf.c index 70902cfbf7fdef6446a639154b14470c61103dd3..2937c6704d89e0265dee179e6002267c18012c85 100644 --- a/src/common/node_conf.c +++ b/src/common/node_conf.c @@ -704,6 +704,7 @@ extern struct node_record *create_node_record ( node_ptr->ext_sensors = ext_sensors_alloc(); node_ptr->owner = NO_VAL; node_ptr->mcs_label = NULL; + node_ptr->protocol_version = SLURM_MIN_PROTOCOL_VERSION; xassert (node_ptr->magic = NODE_MAGIC) /* set value */; return node_ptr; } diff --git a/src/common/slurm_protocol_util.c b/src/common/slurm_protocol_util.c index e7ce90dd74f2ae9e0bdf82259a0008dbb3cb178a..8ecc1d1fd298b5d70b328ddf735a2d7237f0a79a 100644 --- a/src/common/slurm_protocol_util.c +++ b/src/common/slurm_protocol_util.c @@ -127,7 +127,7 @@ void init_header(header_t *header, slurm_msg_t *msg, uint16_t flags) working_cluster_rec->rpc_version; else if ((msg->msg_type == ACCOUNTING_UPDATE_MSG) || (msg->msg_type == ACCOUNTING_FIRST_REG)) { - uint32_t rpc_version = + uint16_t rpc_version = ((accounting_update_msg_t *)msg->data)->rpc_version; msg->protocol_version = header->version = rpc_version; } else diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 06307800bc4ccbf96039f74c179d1a20db0c678e..adca5e66bd7f7c142657f78e976562296214fb3a 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -347,7 +347,7 @@ extern int load_all_node_state ( bool state_only ) if (ver_str && !xstrcmp(ver_str, NODE_STATE_VERSION)) safe_unpack16(&protocol_version, buffer); - if (protocol_version == (uint16_t)NO_VAL) { + if (!protocol_version || (protocol_version == (uint16_t)NO_VAL)) { error("*****************************************************"); error("Can not recover node state, data version incompatible"); error("*****************************************************"); @@ -660,11 +660,13 @@ extern int load_all_node_state ( bool state_only ) if (node_ptr) { node_cnt++; - if (obj_protocol_version != (uint16_t)NO_VAL) + if (obj_protocol_version && + (obj_protocol_version != (uint16_t)NO_VAL)) node_ptr->protocol_version = obj_protocol_version; else node_ptr->protocol_version = protocol_version; + if (!IS_NODE_POWER_SAVE(node_ptr)) node_ptr->last_idle = now; select_g_update_node_state(node_ptr);