diff --git a/NEWS b/NEWS index c41da4794e6806a7331ac1f0e2efb173c7a3fea6..e31a417a52bfd9ff1bfebe64d500d933a842f6a4 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,11 @@ This file describes changes in recent versions of SLURM. It primarily documents those changes that are of interest to users and admins. +* Changes in SLURM 1.2.0-pre3 +============================= + -- Remove configuration parameter ShedulerAuth (defunct). + -- Add NextJobId to "scontrol show config" output. + * Changes in SLURM 1.2.0-pre2 ============================= -- Fixed task dist to work with hostfile and warn about asking for more tasks diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index a527c423d68a3c8e15e99b050dd095d5a702af44..304909d33f56550e445b69b7736b7df9fb764421 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1,4 +1,4 @@ -.TH "slurm.conf" "5" "July 2006" "slurm.conf 1.1" "Slurm configuration file" +.TH "slurm.conf" "5" "September 2006" "slurm.conf 1.2" "Slurm configuration file" .SH "NAME" slurm.conf \- Slurm configuration file .SH "DESCRIPTION" @@ -326,13 +326,6 @@ default value is 0, which means that a node will remain in the DOWN state until a system administrator explicitly changes its state (even if the slurmd daemon registers and resumes communications). .TP -\fBSchedulerAuth\fR -An authentication token, if any, that must be used in a scheduler -communication protocol. The interpretation of this value depends -upon the value of \fBSchedulerType\fR. In the Wiki scheduler plugin, -this value must correspond to the checksum seed with which Maui was -compiled. -.TP \fBSchedulerPort\fR The port number on which slurmctld should listen for connection requests. This value is only used by the Maui Scheduler (see \fBSchedulerType\fR). @@ -921,8 +914,6 @@ ReturnToService=0 .br SchedulerType=sched/wiki .br -SchedulerAuth=42 -.br SchedulerPort=7004 .br SlurmctldLogFile=/var/log/slurmctld.log @@ -1004,6 +995,7 @@ details. /etc/slurm.conf .SH "SEE ALSO" .LP +\fBbluegene.conf\fR(5), \fBgethostbyname\fR(3), \fBgroup\fR(5), \fBhostname\fR(1), \fBscontrol\fR(1), \fBslurmctld\fR(8), \fBslurmd\fR(8), \fBspank(8)\fR, -\fBsyslog\fR(2) +\fBsyslog\fR(2), \fBwiki.conf\fR(5) diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index d2f641c689f906b30ecb65169567dd6fe47c279f..441ed07743837081df2203466949aa950ee62837 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -692,6 +692,7 @@ typedef struct slurm_ctl_conf { char *control_machine; /* name of slurmctld primary server */ char *epilog; /* pathname of job epilog */ uint32_t first_job_id; /* first slurm generated job_id to assign */ + uint32_t next_job_id; /* next slurm generated job_id to assign */ uint16_t fast_schedule; /* 1 to *not* check configurations by node * (only check configuration file, faster) */ uint16_t inactive_limit;/* seconds of inactivity before a @@ -719,7 +720,6 @@ typedef struct slurm_ctl_conf { uint16_t ret2service; /* 1 return DOWN node to service at * registration */ char *schedtype; /* type of scheduler to use */ - char *schedauth; /* credential for scheduler (if needed) */ uint16_t schedport; /* port for scheduler connection */ uint16_t schedrootfltr; /* 1 if rootOnly partitions should be * filtered from scheduling (if needed) */ diff --git a/src/api/config_info.c b/src/api/config_info.c index fa11f58c68a6b04c8d5d4d5033ff031372703b24..61dfbaa3d5a182fd757a47eea332eaa3c0e947be 100644 --- a/src/api/config_info.c +++ b/src/api/config_info.c @@ -129,6 +129,8 @@ void slurm_print_ctl_conf ( FILE* out, #ifdef MULTIPLE_SLURMD fprintf(out, "MULTIPLE_SLURMD = %d\n", MULTIPLE_SLURMD); #endif + fprintf(out, "NEXT_JOB_ID = %u\n", + slurm_ctl_conf_ptr->next_job_id); fprintf(out, "PluginDir = %s\n", slurm_ctl_conf_ptr->plugindir); fprintf(out, "PlugStackConfig = %s\n", @@ -145,8 +147,6 @@ void slurm_print_ctl_conf ( FILE* out, slurm_ctl_conf_ptr->propagate_rlimits_except); fprintf(out, "ReturnToService = %u\n", slurm_ctl_conf_ptr->ret2service); - fprintf(out, "SchedulerAuth = %s\n", - slurm_ctl_conf_ptr->schedauth); fprintf(out, "SchedulerPort = %u\n", slurm_ctl_conf_ptr->schedport); fprintf(out, "SchedulerRootFilter = %u\n", diff --git a/src/common/read_config.c b/src/common/read_config.c index d3dd08dd3bf19ce28e23d5a2e69edc17bd86da02..3e6a453552379e658303ddc3646f48903d8e85fd 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -926,7 +926,6 @@ free_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr) xfree (ctl_conf_ptr->prolog); xfree (ctl_conf_ptr->propagate_rlimits_except); xfree (ctl_conf_ptr->propagate_rlimits); - xfree (ctl_conf_ptr->schedauth); xfree (ctl_conf_ptr->schedtype); xfree (ctl_conf_ptr->select_type); xfree (ctl_conf_ptr->slurm_conf); @@ -983,6 +982,7 @@ init_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr) ctl_conf_ptr->min_job_age = (uint16_t) NO_VAL; xfree (ctl_conf_ptr->mpi_default); ctl_conf_ptr->msg_timeout = (uint16_t) NO_VAL; + ctl_conf_ptr->next_job_id = (uint32_t) NO_VAL; xfree (ctl_conf_ptr->plugindir); xfree (ctl_conf_ptr->plugstack); xfree (ctl_conf_ptr->proctrack_type); @@ -991,7 +991,6 @@ init_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr) xfree (ctl_conf_ptr->propagate_rlimits_except); xfree (ctl_conf_ptr->propagate_rlimits); ctl_conf_ptr->ret2service = (uint16_t) NO_VAL; - xfree( ctl_conf_ptr->schedauth ); ctl_conf_ptr->schedport = (uint16_t) NO_VAL; ctl_conf_ptr->schedrootfltr = (uint16_t) NO_VAL; xfree( ctl_conf_ptr->schedtype ); @@ -1405,8 +1404,6 @@ validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) if (!s_p_get_uint16(&conf->ret2service, "ReturnToService", hashtbl)) conf->ret2service = DEFAULT_RETURN_TO_SERVICE; - s_p_get_string(&conf->schedauth, "SchedulerAuth", hashtbl); - if (s_p_get_uint16(&conf->schedport, "SchedulerPort", hashtbl)) { if (conf->schedport == 0) { error("SchedulerPort=0 is invalid"); diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index 2be34c090834ca66db4a6afe38bdeba82d44fccb..03bc95cd3cc753814a08556d140c57d25bf1845b 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -2039,6 +2039,7 @@ _pack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t * build_ptr, Buf buffer) pack16((uint16_t)build_ptr->min_job_age, buffer); packstr(build_ptr->mpi_default, buffer); pack16((uint16_t)build_ptr->msg_timeout, buffer); + pack32((uint32_t)build_ptr->next_job_id, buffer); packstr(build_ptr->plugindir, buffer); packstr(build_ptr->plugstack, buffer); packstr(build_ptr->proctrack_type, buffer); @@ -2047,7 +2048,6 @@ _pack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t * build_ptr, Buf buffer) packstr(build_ptr->propagate_rlimits, buffer); packstr(build_ptr->propagate_rlimits_except, buffer); pack16((uint16_t)build_ptr->ret2service, buffer); - packstr(build_ptr->schedauth, buffer); pack16((uint16_t)build_ptr->schedport, buffer); pack16((uint16_t)build_ptr->schedrootfltr, buffer); packstr(build_ptr->schedtype, buffer); @@ -2123,6 +2123,7 @@ _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t ** safe_unpack16(&build_ptr->min_job_age, buffer); safe_unpackstr_xmalloc(&build_ptr->mpi_default, &uint16_tmp, buffer); safe_unpack16(&build_ptr->msg_timeout, buffer); + safe_unpack32(&build_ptr->next_job_id, buffer); safe_unpackstr_xmalloc(&build_ptr->plugindir, &uint16_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->plugstack, &uint16_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->proctrack_type, &uint16_tmp, @@ -2134,7 +2135,6 @@ _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t ** safe_unpackstr_xmalloc(&build_ptr->propagate_rlimits_except, &uint16_tmp, buffer); safe_unpack16(&build_ptr->ret2service, buffer); - safe_unpackstr_xmalloc(&build_ptr->schedauth, &uint16_tmp, buffer); safe_unpack16(&build_ptr->schedport, buffer); safe_unpack16(&build_ptr->schedrootfltr, buffer); safe_unpackstr_xmalloc(&build_ptr->schedtype, &uint16_tmp, buffer); @@ -2202,7 +2202,6 @@ unpack_error: xfree(build_ptr->prolog); xfree(build_ptr->propagate_rlimits); xfree(build_ptr->propagate_rlimits_except); - xfree(build_ptr->schedauth); xfree(build_ptr->schedtype); xfree(build_ptr->select_type); xfree(build_ptr->slurm_conf); diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 41b2ce750dbc0511c6540a0c429b7a51a59319fb..10e4041a7b9ff243ebb1a7ba28699526815e670d 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -2987,6 +2987,22 @@ void reset_first_job_id(void) job_id_sequence = slurmctld_conf.first_job_id; } +/* + * get_next_job_id - return the job_id to be used by default for + * the next job + */ +extern uint32_t get_next_job_id(void) +{ + uint32_t next_id; + + if (job_id_sequence == 0) + job_id_sequence = slurmctld_conf.first_job_id; + next_id = job_id_sequence + 1; + if (next_id >= MIN_NOALLOC_JOBID) + next_id = slurmctld_conf.first_job_id; + return next_id; +} + /* * _set_job_id - set a default job_id, insure that it is unique * IN job_ptr - pointer to the job_record diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index dc19009b23d2714688042ffb1ace744d1945b2fb..d536aa55aa553594fc30af8ebee91ee593d41312 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -344,6 +344,7 @@ void _fill_ctld_conf(slurm_ctl_conf_t * conf_ptr) conf_ptr->min_job_age = conf->min_job_age; conf_ptr->mpi_default = xstrdup(conf->mpi_default); conf_ptr->msg_timeout = conf->msg_timeout; + conf_ptr->next_job_id = get_next_job_id(); conf_ptr->plugindir = xstrdup(conf->plugindir); conf_ptr->plugstack = xstrdup(conf->plugstack); conf_ptr->proctrack_type = xstrdup(conf->proctrack_type); @@ -354,7 +355,6 @@ void _fill_ctld_conf(slurm_ctl_conf_t * conf_ptr) conf_ptr->propagate_rlimits_except = xstrdup(conf-> propagate_rlimits_except); conf_ptr->ret2service = conf->ret2service; - conf_ptr->schedauth = xstrdup(conf->schedauth); conf_ptr->schedport = conf->schedport; conf_ptr->schedrootfltr = conf->schedrootfltr; conf_ptr->schedtype = xstrdup(conf->schedtype); diff --git a/src/slurmctld/sched_upcalls.c b/src/slurmctld/sched_upcalls.c index bd4ebea2949a76cf533882ad00b5dff1590736ce..7ffea3912a74620849568eb5487d8a84f10eab24 100644 --- a/src/slurmctld/sched_upcalls.c +++ b/src/slurmctld/sched_upcalls.c @@ -171,18 +171,7 @@ sched_get_port( void ) const char * sched_get_auth( void ) { - static char auth[128]; - /* Locks: Read config */ - slurmctld_lock_t config_read_lock = { - READ_LOCK, NO_LOCK, NO_LOCK, NO_LOCK }; - - lock_slurmctld(config_read_lock); - strncpy(auth, slurmctld_conf.schedauth, 128); - if (auth[127] != '\0') { - auth[127] = '\0'; - error("slurmctld_conf.schedauth truncated"); - } - unlock_slurmctld(config_read_lock); + static char auth[] = ""; return auth; } diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index db103e3700a12b335a2b62eeb23e6bfaf67c5247..2b42802375009277dc9f2f090f00718e3ae8b151 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -575,6 +575,12 @@ extern char **get_job_env (struct job_record *job_ptr, uint16_t *env_size); */ extern char *get_job_script (struct job_record *job_ptr); +/* + * get_next_job_id - return the job_id to be used by default for + * the next job + */ +extern uint32_t get_next_job_id(void); + /* * find_step_record - return a pointer to the step record with the given * job_id and step_id