View | Details | Raw Unified | Return to ticket 3933 | Differences between
and this patch

Collapse All | Expand All

(-)a/doc/man/man5/slurm.conf.5 (+17 lines)
Lines 3245-3250 Configure SlurmctldPort to use a port outside of the configured SrunPortRange Link Here
3245
and RSIP's port range.
3245
and RSIP's port range.
3246
3246
3247
.TP
3247
.TP
3248
\fBSlurmctldSyslogDebug\fR
3249
If \fBSlurmctldLogFile\fR is specified and this option is set (e.g. "yes"), the
3250
slurmctld daemon will direct its logs to both the logfile specified and
3251
syslog.  If the slurmctld daemon is run in the foreground, it will log
3252
into only the logfile.  Omit this option if the described behavior is not
3253
desired.
3254
3255
.TP
3248
\fBSlurmctldTimeout\fR
3256
\fBSlurmctldTimeout\fR
3249
The interval, in seconds, that the backup controller waits for the
3257
The interval, in seconds, that the backup controller waits for the
3250
primary controller to respond before assuming control.
3258
primary controller to respond before assuming control.
Lines 3343-3348 Any "%n" within the name is replaced with the Slurm node name on which the Link Here
3343
\fBslurmd\fR is running.
3351
\fBslurmd\fR is running.
3344
3352
3345
.TP
3353
.TP
3354
\fBSlurmdSyslogDebug\fR
3355
If \fBSlurmdLogFile\fR is specified and this option is set (e.g. "yes"), the
3356
slurmd daemon will direct its logs to both the logfile specified and
3357
syslog.  If the slurmd daemon is run in the foreground, it will log
3358
into only the logfile.  Omit this option if the described behavior is not
3359
desired.
3360
3361
3362
.TP
3346
\fBSlurmdTimeout\fR
3363
\fBSlurmdTimeout\fR
3347
The interval, in seconds, that the Slurm controller waits for \fBslurmd\fR
3364
The interval, in seconds, that the Slurm controller waits for \fBslurmd\fR
3348
to respond before configuring that node's state to DOWN.
3365
to respond before configuring that node's state to DOWN.
(-)a/doc/man/man5/slurmdbd.conf.5 (+8 lines)
Lines 268-273 Log errors and verbose informational messages and even more debugging messages Link Here
268
.RE
268
.RE
269
269
270
.TP
270
.TP
271
\fBDebugLevelSyslog\fR
272
If \fBLogFile\fR is specified and this option is set (e.g. "yes"), the
273
slurmctld daemon will direct its logs to both the logfile specified and
274
syslog.  If the slurmdbd daemon is run in the foreground, it will log
275
into only the logfile.  Omit this option if the described behavior is not
276
desired.
277
278
.TP
271
\fBDefaultQOS\fR
279
\fBDefaultQOS\fR
272
When adding a new cluster this will be used as the qos for the cluster
280
When adding a new cluster this will be used as the qos for the cluster
273
unless something is explicitly set by the admin with the create.
281
unless something is explicitly set by the admin with the create.
(-)a/slurm/slurm.h.in (+4 lines)
Lines 2845-2850 typedef struct slurm_ctl_conf { Link Here
2845
	char *slurmctld_plugstack;/* generic slurmctld plugins */
2845
	char *slurmctld_plugstack;/* generic slurmctld plugins */
2846
	uint32_t slurmctld_port;  /* default communications port to slurmctld */
2846
	uint32_t slurmctld_port;  /* default communications port to slurmctld */
2847
	uint16_t slurmctld_port_count; /* number of slurmctld comm ports */
2847
	uint16_t slurmctld_port_count; /* number of slurmctld comm ports */
2848
	char *slurmctld_syslog_debug; /* slurmctld output to
2849
					local logfile and syslog*/
2848
	uint16_t slurmctld_timeout;/* seconds that backup controller waits
2850
	uint16_t slurmctld_timeout;/* seconds that backup controller waits
2849
				    * on non-responding primarly controller */
2851
				    * on non-responding primarly controller */
2850
	uint16_t slurmd_debug;	/* slurmd logging level */
2852
	uint16_t slurmd_debug;	/* slurmd logging level */
Lines 2853-2858 typedef struct slurm_ctl_conf { Link Here
2853
	char *slurmd_plugstack; /* generic slurmd plugins */
2855
	char *slurmd_plugstack; /* generic slurmd plugins */
2854
	uint32_t slurmd_port;	/* default communications port to slurmd */
2856
	uint32_t slurmd_port;	/* default communications port to slurmd */
2855
	char *slurmd_spooldir;	/* where slurmd put temporary state info */
2857
	char *slurmd_spooldir;	/* where slurmd put temporary state info */
2858
	char *slurmd_syslog_debug; /* slurmd output to
2859
				     local logfile and syslog*/
2856
	uint16_t slurmd_timeout;/* how long slurmctld waits for slurmd before
2860
	uint16_t slurmd_timeout;/* how long slurmctld waits for slurmd before
2857
				 * considering node DOWN */
2861
				 * considering node DOWN */
2858
	char *srun_epilog;      /* srun epilog program */
2862
	char *srun_epilog;      /* srun epilog program */
(-)a/src/common/read_config.c (+11 lines)
Lines 326-331 s_p_options_t slurm_conf_options[] = { Link Here
326
	{"SlurmctldPidFile", S_P_STRING},
326
	{"SlurmctldPidFile", S_P_STRING},
327
	{"SlurmctldPlugstack", S_P_STRING},
327
	{"SlurmctldPlugstack", S_P_STRING},
328
	{"SlurmctldPort", S_P_STRING},
328
	{"SlurmctldPort", S_P_STRING},
329
	{"SlurmctldSyslogDebug", S_P_STRING},
329
	{"SlurmctldTimeout", S_P_UINT16},
330
	{"SlurmctldTimeout", S_P_UINT16},
330
	{"SlurmdDebug", S_P_STRING},
331
	{"SlurmdDebug", S_P_STRING},
331
	{"SlurmdLogFile", S_P_STRING},
332
	{"SlurmdLogFile", S_P_STRING},
Lines 333-338 s_p_options_t slurm_conf_options[] = { Link Here
333
	{"SlurmdPlugstack", S_P_STRING},
334
	{"SlurmdPlugstack", S_P_STRING},
334
	{"SlurmdPort", S_P_UINT32},
335
	{"SlurmdPort", S_P_UINT32},
335
	{"SlurmdSpoolDir", S_P_STRING},
336
	{"SlurmdSpoolDir", S_P_STRING},
337
	{"SlurmdSyslogDebug", S_P_STRING},
336
	{"SlurmdTimeout", S_P_UINT16},
338
	{"SlurmdTimeout", S_P_UINT16},
337
	{"SlurmSchedLogFile", S_P_STRING},
339
	{"SlurmSchedLogFile", S_P_STRING},
338
	{"SlurmSchedLogLevel", S_P_UINT16},
340
	{"SlurmSchedLogLevel", S_P_UINT16},
Lines 2590-2595 init_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr) Link Here
2590
	xfree (ctl_conf_ptr->slurmd_user_name);
2592
	xfree (ctl_conf_ptr->slurmd_user_name);
2591
	ctl_conf_ptr->slurmctld_debug		= (uint16_t) NO_VAL;
2593
	ctl_conf_ptr->slurmctld_debug		= (uint16_t) NO_VAL;
2592
	xfree (ctl_conf_ptr->slurmctld_logfile);
2594
	xfree (ctl_conf_ptr->slurmctld_logfile);
2595
	xfree (ctl_conf_ptr->slurmctld_syslog_debug);
2593
	xfree (ctl_conf_ptr->sched_logfile);
2596
	xfree (ctl_conf_ptr->sched_logfile);
2594
	ctl_conf_ptr->sched_log_level		= (uint16_t) NO_VAL;
2597
	ctl_conf_ptr->sched_log_level		= (uint16_t) NO_VAL;
2595
	xfree (ctl_conf_ptr->slurmctld_pidfile);
2598
	xfree (ctl_conf_ptr->slurmctld_pidfile);
Lines 2599-2604 init_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr) Link Here
2599
	ctl_conf_ptr->slurmctld_timeout		= (uint16_t) NO_VAL;
2602
	ctl_conf_ptr->slurmctld_timeout		= (uint16_t) NO_VAL;
2600
	ctl_conf_ptr->slurmd_debug		= (uint16_t) NO_VAL;
2603
	ctl_conf_ptr->slurmd_debug		= (uint16_t) NO_VAL;
2601
	xfree (ctl_conf_ptr->slurmd_logfile);
2604
	xfree (ctl_conf_ptr->slurmd_logfile);
2605
	xfree (ctl_conf_ptr->slurmd_syslog_debug);
2602
	xfree (ctl_conf_ptr->slurmd_pidfile);
2606
	xfree (ctl_conf_ptr->slurmd_pidfile);
2603
	xfree (ctl_conf_ptr->slurmd_plugstack);
2607
	xfree (ctl_conf_ptr->slurmd_plugstack);
2604
 	ctl_conf_ptr->slurmd_port		= (uint32_t) NO_VAL;
2608
 	ctl_conf_ptr->slurmd_port		= (uint32_t) NO_VAL;
Lines 4091-4096 _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) Link Here
4091
	(void )s_p_get_string(&conf->slurmctld_logfile, "SlurmctldLogFile",
4095
	(void )s_p_get_string(&conf->slurmctld_logfile, "SlurmctldLogFile",
4092
			      hashtbl);
4096
			      hashtbl);
4093
4097
4098
	if (!s_p_get_string(&conf->slurmctld_syslog_debug, "SlurmctldSyslogDebug", hashtbl))
4099
		conf->slurmctld_syslog_debug = DEFAULT_SYSLOG_DEBUG;
4100
4094
	if (s_p_get_string(&temp_str, "SlurmctldPort", hashtbl)) {
4101
	if (s_p_get_string(&temp_str, "SlurmctldPort", hashtbl)) {
4095
		char *end_ptr = NULL;
4102
		char *end_ptr = NULL;
4096
		long port_long;
4103
		long port_long;
Lines 4167-4172 _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) Link Here
4167
	if (!s_p_get_uint16(&conf->slurmd_timeout, "SlurmdTimeout", hashtbl))
4174
	if (!s_p_get_uint16(&conf->slurmd_timeout, "SlurmdTimeout", hashtbl))
4168
		conf->slurmd_timeout = DEFAULT_SLURMD_TIMEOUT;
4175
		conf->slurmd_timeout = DEFAULT_SLURMD_TIMEOUT;
4169
4176
4177
	if (!s_p_get_string(&conf->slurmd_syslog_debug, "SlurmdSyslogDebug", hashtbl))
4178
		conf->slurmd_syslog_debug = DEFAULT_SYSLOG_DEBUG;
4179
4180
4170
	(void) s_p_get_string(&conf->srun_prolog, "SrunProlog", hashtbl);
4181
	(void) s_p_get_string(&conf->srun_prolog, "SrunProlog", hashtbl);
4171
	if (s_p_get_string(&temp_str, "SrunPortRange", hashtbl)) {
4182
	if (s_p_get_string(&temp_str, "SrunPortRange", hashtbl)) {
4172
		conf->srun_port_range = _parse_srun_ports(temp_str);
4183
		conf->srun_port_range = _parse_srun_ports(temp_str);
(-)a/src/common/read_config.h (+1 lines)
Lines 163-168 extern char *default_plugstack; Link Here
163
#define DEFAULT_SLURMCTLD_TIMEOUT   120
163
#define DEFAULT_SLURMCTLD_TIMEOUT   120
164
#define DEFAULT_SLURMD_PIDFILE      "/var/run/slurmd.pid"
164
#define DEFAULT_SLURMD_PIDFILE      "/var/run/slurmd.pid"
165
#define DEFAULT_SLURMD_TIMEOUT      300
165
#define DEFAULT_SLURMD_TIMEOUT      300
166
#define DEFAULT_SYSLOG_DEBUG        0
166
#define DEFAULT_SPOOLDIR            "/var/spool/slurmd"
167
#define DEFAULT_SPOOLDIR            "/var/spool/slurmd"
167
#define DEFAULT_STORAGE_HOST        "localhost"
168
#define DEFAULT_STORAGE_HOST        "localhost"
168
#define DEFAULT_STORAGE_LOC         "/var/log/slurm_jobacct.log"
169
#define DEFAULT_STORAGE_LOC         "/var/log/slurm_jobacct.log"
(-)a/src/slurmctld/controller.c (-1 / +2 lines)
Lines 2553-2559 void update_logging(void) Link Here
2553
2553
2554
	if (daemonize) {
2554
	if (daemonize) {
2555
		log_opts.stderr_level = LOG_LEVEL_QUIET;
2555
		log_opts.stderr_level = LOG_LEVEL_QUIET;
2556
		if (slurmctld_conf.slurmctld_logfile)
2556
		if (slurmctld_conf.slurmctld_logfile &&
2557
		    !slurmctld_conf.slurmctld_syslog_debug)
2557
			log_opts.syslog_level = LOG_LEVEL_FATAL;
2558
			log_opts.syslog_level = LOG_LEVEL_FATAL;
2558
	} else
2559
	} else
2559
		log_opts.syslog_level = LOG_LEVEL_QUIET;
2560
		log_opts.syslog_level = LOG_LEVEL_QUIET;
(-)a/src/slurmd/slurmd/slurmd.c (-1 / +8 lines)
Lines 833-838 _read_config(void) Link Here
833
	if (!conf->logfile)
833
	if (!conf->logfile)
834
		conf->logfile = xstrdup(cf->slurmd_logfile);
834
		conf->logfile = xstrdup(cf->slurmd_logfile);
835
835
836
	if (!conf->syslog_debug)
837
		conf->syslog_debug = xstrdup(cf->slurmd_syslog_debug);
838
836
#ifndef HAVE_FRONT_END
839
#ifndef HAVE_FRONT_END
837
	if (!xstrcmp(cf->select_type, "select/cons_res"))
840
	if (!xstrcmp(cf->select_type, "select/cons_res"))
838
		cr_flag = true;
841
		cr_flag = true;
Lines 1192-1197 _print_conf(void) Link Here
1192
	debug3("TmpDisk     = %u",       conf->tmp_disk_space);
1195
	debug3("TmpDisk     = %u",       conf->tmp_disk_space);
1193
	debug3("Epilog      = `%s'",     conf->epilog);
1196
	debug3("Epilog      = `%s'",     conf->epilog);
1194
	debug3("Logfile     = `%s'",     cf->slurmd_logfile);
1197
	debug3("Logfile     = `%s'",     cf->slurmd_logfile);
1198
	debug3("Syslog_Debug  = `%s'",     cf->slurmd_syslog_debug ?
1199
	       					cf->slurmd_syslog_debug :
1200
						"NO");
1195
	debug3("HealthCheck = `%s'",     conf->health_check_program);
1201
	debug3("HealthCheck = `%s'",     conf->health_check_program);
1196
	debug3("NodeName    = %s",       conf->node_name);
1202
	debug3("NodeName    = %s",       conf->node_name);
1197
	debug3("NodeAddr    = %s",       conf->node_addr);
1203
	debug3("NodeAddr    = %s",       conf->node_addr);
Lines 1940-1946 static void _update_logging(void) Link Here
1940
	 */
1946
	 */
1941
	if (conf->daemonize) {
1947
	if (conf->daemonize) {
1942
		o->stderr_level = LOG_LEVEL_QUIET;
1948
		o->stderr_level = LOG_LEVEL_QUIET;
1943
		if (conf->logfile)
1949
		if (conf->logfile &&
1950
		   !conf->syslog_debug)
1944
			o->syslog_level = LOG_LEVEL_FATAL;
1951
			o->syslog_level = LOG_LEVEL_FATAL;
1945
	} else
1952
	} else
1946
		o->syslog_level  = LOG_LEVEL_QUIET;
1953
		o->syslog_level  = LOG_LEVEL_QUIET;
(-)a/src/slurmd/slurmd/slurmd.h (+2 lines)
Lines 111-116 typedef struct slurmd_config { Link Here
111
	char         *node_topo_pattern;/* node's topology address pattern */
111
	char         *node_topo_pattern;/* node's topology address pattern */
112
	char         *conffile;		/* config filename                 */
112
	char         *conffile;		/* config filename                 */
113
	char         *logfile;		/* slurmd logfile, if any          */
113
	char         *logfile;		/* slurmd logfile, if any          */
114
	char         *syslog_debug;     /* send output to both logfile and
115
					   syslog */
114
	char         *spooldir;		/* SlurmdSpoolDir		   */
116
	char         *spooldir;		/* SlurmdSpoolDir		   */
115
	char         *pidfile;		/* PidFile location		   */
117
	char         *pidfile;		/* PidFile location		   */
116
	char         *health_check_program; /* run on RPC request or at start */
118
	char         *health_check_program; /* run on RPC request or at start */
(-)a/src/slurmdbd/read_config.c (+6 lines)
Lines 99-104 static void _clear_slurmdbd_conf(void) Link Here
99
		slurmdbd_conf->debug_level = 0;
99
		slurmdbd_conf->debug_level = 0;
100
		xfree(slurmdbd_conf->default_qos);
100
		xfree(slurmdbd_conf->default_qos);
101
		xfree(slurmdbd_conf->log_file);
101
		xfree(slurmdbd_conf->log_file);
102
		xfree(slurmdbd_conf->syslog_debug);
102
		xfree(slurmdbd_conf->pid_file);
103
		xfree(slurmdbd_conf->pid_file);
103
		xfree(slurmdbd_conf->plugindir);
104
		xfree(slurmdbd_conf->plugindir);
104
		slurmdbd_conf->private_data = 0;
105
		slurmdbd_conf->private_data = 0;
Lines 150-155 extern int read_slurmdbd_conf(void) Link Here
150
		{"DbdPort", S_P_UINT16},
151
		{"DbdPort", S_P_UINT16},
151
		{"DebugFlags", S_P_STRING},
152
		{"DebugFlags", S_P_STRING},
152
		{"DebugLevel", S_P_STRING},
153
		{"DebugLevel", S_P_STRING},
154
		{"DebugLevelSyslog", S_P_STRING},
153
		{"DefaultQOS", S_P_STRING},
155
		{"DefaultQOS", S_P_STRING},
154
		{"JobPurge", S_P_UINT32},
156
		{"JobPurge", S_P_UINT32},
155
		{"LogFile", S_P_STRING},
157
		{"LogFile", S_P_STRING},
Lines 266-271 extern int read_slurmdbd_conf(void) Link Here
266
268
267
		s_p_get_string(&slurmdbd_conf->log_file, "LogFile", tbl);
269
		s_p_get_string(&slurmdbd_conf->log_file, "LogFile", tbl);
268
270
271
		if (!s_p_get_string(&slurmdbd_conf->syslog_debug,
272
				    "DebugLevelSyslog", tbl))
273
			slurmdbd_conf->syslog_debug = DEFAULT_SYSLOG_DEBUG;
274
269
		if (s_p_get_string(&temp_str, "LogTimeFormat", tbl)) {
275
		if (s_p_get_string(&temp_str, "LogTimeFormat", tbl)) {
270
			if (xstrcasestr(temp_str, "iso8601_ms"))
276
			if (xstrcasestr(temp_str, "iso8601_ms"))
271
				slurmdbd_conf->log_fmt = LOG_FMT_ISO8601_MS;
277
				slurmdbd_conf->log_fmt = LOG_FMT_ISO8601_MS;
(-)a/src/slurmdbd/read_config.h (+1 lines)
Lines 73-78 typedef struct slurm_dbd_conf { Link Here
73
	char *	 	default_qos;	/* default qos setting when
73
	char *	 	default_qos;	/* default qos setting when
74
					 * adding clusters              */
74
					 * adding clusters              */
75
	char *		log_file;	/* Log file			*/
75
	char *		log_file;	/* Log file			*/
76
	char *		syslog_debug;	/* output to both logfile and syslog*/
76
	uint16_t        log_fmt;        /* Log file timestamt format    */
77
	uint16_t        log_fmt;        /* Log file timestamt format    */
77
	uint16_t        msg_timeout;    /* message timeout		*/
78
	uint16_t        msg_timeout;    /* message timeout		*/
78
	char *		pid_file;	/* where to store current PID	*/
79
	char *		pid_file;	/* where to store current PID	*/
(-)a/src/slurmdbd/slurmdbd.c (-1 / +2 lines)
Lines 524-530 static void _update_logging(bool startup) Link Here
524
		log_opts.syslog_level = LOG_LEVEL_QUIET;
524
		log_opts.syslog_level = LOG_LEVEL_QUIET;
525
	else {
525
	else {
526
		log_opts.stderr_level = LOG_LEVEL_QUIET;
526
		log_opts.stderr_level = LOG_LEVEL_QUIET;
527
		if (slurmdbd_conf->log_file)
527
		if (slurmdbd_conf->log_file &&
528
		    !slurmdbd_conf->syslog_debug)
528
			log_opts.syslog_level = LOG_LEVEL_QUIET;
529
			log_opts.syslog_level = LOG_LEVEL_QUIET;
529
	}
530
	}
530
531

Return to ticket 3933