diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 582e8314ec0a22c1221aedba8214d194c1de1c12..ac3b520c5cc98f2279e628cf37bf17f1fe3732de 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -440,7 +440,7 @@ load_node_state ( void ) char *node_name, *state_file; int buffer_allocated, buffer_used = 0, error_code = 0; uint16_t node_state, name_len; - uint32_t time, cpus, real_memory, tmp_disk; + uint32_t time_stamp, cpus, real_memory, tmp_disk; struct node_record *node_ptr; uint32_t buffer_size = 0; int state_fd; @@ -476,7 +476,7 @@ load_node_state ( void ) unlock_state_files (); if (buffer_size > sizeof (uint32_t)) - unpack32 (&time, &buf_ptr, &buffer_size); + unpack32 (&time_stamp, &buf_ptr, &buffer_size); while (buffer_size > 0) { safe_unpackstr_xmalloc (&node_name, &name_len, &buf_ptr, &buffer_size); @@ -492,6 +492,7 @@ load_node_state ( void ) node_ptr->cpus = cpus; node_ptr->real_memory = real_memory; node_ptr->tmp_disk = tmp_disk; + node_ptr->last_response = time (NULL); } if (node_name) xfree (node_name); @@ -1123,7 +1124,6 @@ node_not_resp (char *name) bit_clear (up_node_bitmap, i); bit_clear (idle_node_bitmap, i); node_record_table_ptr[i].node_state |= NODE_STATE_NO_RESPOND; - kill_running_job_by_node_name (node_record_table_ptr[i].name); return; } @@ -1165,7 +1165,7 @@ ping_nodes (void) last_node_update = time (NULL); bit_clear (up_node_bitmap, i); bit_clear (idle_node_bitmap, i); - node_record_table_ptr[i].node_state |= NODE_STATE_NO_RESPOND; + node_record_table_ptr[i].node_state = NODE_STATE_DOWN; kill_running_job_by_node_name (node_record_table_ptr[i].name); } } @@ -1190,4 +1190,3 @@ ping_nodes (void) fatal ("pthread_create error %m"); } } - diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 55a0e5a41bbde8dae0aa08d36277e4f509aa94d7..68cb7f43dd79aea73366df0274382a6e13d02b18 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -36,6 +36,7 @@ #include <syslog.h> #include <sys/types.h> #include <sys/stat.h> +#include <time.h> #include <unistd.h> #include <src/common/hostlist.h> @@ -491,6 +492,7 @@ parse_node_spec (char *in_line) { if ((state_val != NO_VAL) && (state_val != NODE_STATE_UNKNOWN)) node_record_point->node_state = state_val; + node_record_point->last_response = time (NULL); } else { error ("parse_node_spec: reconfiguration for node %s ignored.",