diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index 1b857ce7c501e073268bc600a3d247eef9153aec..76b68003318f780f701a096f817ef914aae27c75 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -195,8 +195,7 @@ main (int argc, char *argv[]) shutdown_time = time (NULL); /* send REQUEST_SHUTDOWN_IMMEDIATE RPC */ slurm_shutdown (); - /* ssl clean up - */ + /* ssl clean up */ slurm_destroy_ssl_key_ctx ( & sign_ctx ) ; slurm_ssl_destroy ( ) ; @@ -325,13 +324,16 @@ void * service_connection ( void * arg ) void * slurmctld_background ( void * no_data ) { - static time_t last_sched_time = (time_t) NULL; - static time_t last_checkpoint_time = (time_t) NULL; - static time_t last_timelimit_time = (time_t) NULL; + static time_t last_sched_time; + static time_t last_checkpoint_time; + static time_t last_timelimit_time; time_t now; /* Locks: Write job, write node, read partition */ slurmctld_lock_t job_write_lock = { NO_LOCK, WRITE_LOCK, WRITE_LOCK, READ_LOCK }; + /* Let the dust settle before doing work */ + last_sched_time = last_checkpoint_time = last_timelimit_time = time (NULL); + while (shutdown_time == 0) { sleep (1); diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index f5ba092e663d9821400b1dfd888d98ea415d3739..e1b72cd65d3336516aab66f9defad4853c272007 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -179,9 +179,9 @@ struct job_record { }; struct step_record { - struct job_record* job_ptr; /* ptr to the job that owns the step */ + struct job_record* job_ptr; /* ptr to the job that owns the step */ uint16_t step_id; /* step number */ - time_t start_time; /* step allocation time */ + time_t start_time; /* step allocation time */ bitstr_t *node_bitmap; /* bitmap of nodes in allocated to job step */ #ifdef HAVE_LIBELAN3 qsw_jobinfo_t qsw_job; /* Elan3 switch context, opaque data structure */