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

removed STATE_UNKNOWN from sync check so first registration is the only...

removed STATE_UNKNOWN from sync check so first registration is the only registration that will send info to the database
parent 8fb98b66
No related branches found
No related tags found
No related merge requests found
...@@ -1333,6 +1333,10 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) ...@@ -1333,6 +1333,10 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg)
} }
} else { } else {
uint16_t err_cpus = 0; uint16_t err_cpus = 0;
select_g_select_nodeinfo_get(node_ptr->select_nodeinfo,
SELECT_NODEDATA_SUBCNT,
NODE_STATE_ERROR,
&err_cpus);
if (IS_NODE_UNKNOWN(node_ptr)) { if (IS_NODE_UNKNOWN(node_ptr)) {
last_node_update = time (NULL); last_node_update = time (NULL);
reset_job_priority(); reset_job_priority();
...@@ -1346,6 +1350,14 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) ...@@ -1346,6 +1350,14 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg)
node_flags; node_flags;
node_ptr->last_idle = now; node_ptr->last_idle = now;
} }
if (!err_cpus
&& !IS_NODE_DRAIN(node_ptr)
&& !IS_NODE_FAIL(node_ptr)) {
xfree(node_ptr->reason);
clusteracct_storage_g_node_up(
acct_db_conn, slurmctld_cluster_name,
node_ptr, now);
}
} else if (IS_NODE_DOWN(node_ptr) && } else if (IS_NODE_DOWN(node_ptr) &&
((slurmctld_conf.ret2service == 2) || ((slurmctld_conf.ret2service == 2) ||
((slurmctld_conf.ret2service == 1) && ((slurmctld_conf.ret2service == 1) &&
...@@ -1365,6 +1377,14 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) ...@@ -1365,6 +1377,14 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg)
reg_msg->node_name); reg_msg->node_name);
reset_job_priority(); reset_job_priority();
trigger_node_up(node_ptr); trigger_node_up(node_ptr);
if (!err_cpus
&& !IS_NODE_DRAIN(node_ptr)
&& !IS_NODE_FAIL(node_ptr)) {
xfree(node_ptr->reason);
clusteracct_storage_g_node_up(
acct_db_conn, slurmctld_cluster_name,
node_ptr, now);
}
} else if (IS_NODE_ALLOCATED(node_ptr) && } else if (IS_NODE_ALLOCATED(node_ptr) &&
(reg_msg->job_count == 0)) { /* job vanished */ (reg_msg->job_count == 0)) { /* job vanished */
last_node_update = now; last_node_update = now;
...@@ -1376,19 +1396,6 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) ...@@ -1376,19 +1396,6 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg)
node_ptr->node_state &= (~NODE_STATE_COMPLETING); node_ptr->node_state &= (~NODE_STATE_COMPLETING);
} }
select_g_select_nodeinfo_get(node_ptr->select_nodeinfo,
SELECT_NODEDATA_SUBCNT,
NODE_STATE_ERROR,
&err_cpus);
if (!err_cpus && !IS_NODE_DOWN(node_ptr)
&& !IS_NODE_DRAIN(node_ptr)
&& !IS_NODE_FAIL(node_ptr)) {
xfree(node_ptr->reason);
clusteracct_storage_g_node_up(
acct_db_conn, slurmctld_cluster_name,
node_ptr, now);
}
select_g_update_node_config((node_ptr-node_record_table_ptr)); select_g_update_node_config((node_ptr-node_record_table_ptr));
select_g_update_node_state((node_ptr - node_record_table_ptr), select_g_update_node_state((node_ptr - node_record_table_ptr),
node_ptr->node_state); node_ptr->node_state);
...@@ -1540,6 +1547,10 @@ extern int validate_nodes_via_front_end( ...@@ -1540,6 +1547,10 @@ extern int validate_nodes_via_front_end(
} }
} else { } else {
uint16_t err_cpus = 0; uint16_t err_cpus = 0;
select_g_select_nodeinfo_get(node_ptr->select_nodeinfo,
SELECT_NODEDATA_SUBCNT,
NODE_STATE_ERROR,
&err_cpus);
if (reg_hostlist) if (reg_hostlist)
(void) hostlist_push_host( (void) hostlist_push_host(
reg_hostlist, node_ptr->name); reg_hostlist, node_ptr->name);
...@@ -1559,6 +1570,15 @@ extern int validate_nodes_via_front_end( ...@@ -1559,6 +1570,15 @@ extern int validate_nodes_via_front_end(
node_flags; node_flags;
node_ptr->last_idle = now; node_ptr->last_idle = now;
} }
if (!err_cpus
&& !IS_NODE_DRAIN(node_ptr)
&& !IS_NODE_FAIL(node_ptr)) {
xfree(node_ptr->reason);
clusteracct_storage_g_node_up(
acct_db_conn,
slurmctld_cluster_name,
node_ptr, now);
}
} else if (IS_NODE_DOWN(node_ptr) && } else if (IS_NODE_DOWN(node_ptr) &&
(slurmctld_conf.ret2service == 1)) { (slurmctld_conf.ret2service == 1)) {
updated_job = true; updated_job = true;
...@@ -1573,6 +1593,15 @@ extern int validate_nodes_via_front_end( ...@@ -1573,6 +1593,15 @@ extern int validate_nodes_via_front_end(
node_ptr->last_idle = now; node_ptr->last_idle = now;
} }
trigger_node_up(node_ptr); trigger_node_up(node_ptr);
if (!err_cpus
&& !IS_NODE_DRAIN(node_ptr)
&& !IS_NODE_FAIL(node_ptr)) {
xfree(node_ptr->reason);
clusteracct_storage_g_node_up(
acct_db_conn,
slurmctld_cluster_name,
node_ptr, now);
}
} else if (IS_NODE_ALLOCATED(node_ptr) && } else if (IS_NODE_ALLOCATED(node_ptr) &&
(jobs_on_node == 0)) { (jobs_on_node == 0)) {
/* job vanished */ /* job vanished */
...@@ -1588,19 +1617,6 @@ extern int validate_nodes_via_front_end( ...@@ -1588,19 +1617,6 @@ extern int validate_nodes_via_front_end(
(~NODE_STATE_COMPLETING); (~NODE_STATE_COMPLETING);
} }
select_g_select_nodeinfo_get(node_ptr->select_nodeinfo,
SELECT_NODEDATA_SUBCNT,
NODE_STATE_ERROR,
&err_cpus);
if (!err_cpus && !IS_NODE_DOWN(node_ptr)
&& !IS_NODE_DRAIN(node_ptr)
&& !IS_NODE_FAIL(node_ptr)) {
xfree(node_ptr->reason);
clusteracct_storage_g_node_up(
acct_db_conn, slurmctld_cluster_name,
node_ptr, now);
}
select_g_update_node_config( select_g_update_node_config(
(node_ptr - node_record_table_ptr)); (node_ptr - node_record_table_ptr));
select_g_update_node_state( select_g_update_node_state(
......
...@@ -1077,8 +1077,7 @@ static int _sync_nodes_to_active_job(struct job_record *job_ptr) ...@@ -1077,8 +1077,7 @@ static int _sync_nodes_to_active_job(struct job_record *job_ptr)
xfree(job_ptr->state_desc); xfree(job_ptr->state_desc);
job_completion_logger(job_ptr); job_completion_logger(job_ptr);
cnt++; cnt++;
} else if (IS_NODE_UNKNOWN(node_ptr) || } else if (IS_NODE_IDLE(node_ptr)) {
IS_NODE_IDLE(node_ptr)) {
cnt++; cnt++;
node_ptr->node_state = node_ptr->node_state =
NODE_STATE_ALLOCATED | node_flags; NODE_STATE_ALLOCATED | node_flags;
......
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