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

Collapse All | Expand All

(-)a/doc/man/man5/slurm.conf.5 (+87 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 to any of
3250
below values, the
3251
slurmctld daemon will direct its logs to the logfile and
3252
to the syslog at that level of detail (logfile will receive
3253
at level specified in \fBSlurmctldDebug\fR).
3254
If the slurmctld daemon is run in the foreground, it will log
3255
into only the logfile.  Default is \fBquiet\fR.
3256
3257
.RS
3258
.TP 10
3259
\fBquiet\fR
3260
Log nothing
3261
.TP
3262
\fBfatal\fR
3263
Log only fatal errors
3264
.TP
3265
\fBerror\fR
3266
Log only errors
3267
.TP
3268
\fBinfo\fR
3269
Log errors and general informational messages
3270
.TP
3271
\fBverbose\fR
3272
Log errors and verbose informational messages
3273
.TP
3274
\fBdebug\fR
3275
Log errors and verbose informational messages and debugging messages
3276
.TP
3277
\fBdebug2\fR
3278
Log errors and verbose informational messages and more debugging messages
3279
.TP
3280
\fBdebug3\fR
3281
Log errors and verbose informational messages and even more debugging messages
3282
.TP
3283
\fBdebug4\fR
3284
Log errors and verbose informational messages and even more debugging messages
3285
.TP
3286
\fBdebug5\fR
3287
Log errors and verbose informational messages and even more debugging messages
3288
.RE
3289
3290
3291
.TP
3248
\fBSlurmctldTimeout\fR
3292
\fBSlurmctldTimeout\fR
3249
The interval, in seconds, that the backup controller waits for the
3293
The interval, in seconds, that the backup controller waits for the
3250
primary controller to respond before assuming control.
3294
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.
3387
\fBslurmd\fR is running.
3344
3388
3345
.TP
3389
.TP
3390
\fBSlurmdSyslogDebug\fR
3391
If \fBSlurmdLogFile\fR is specified and this option is set to any of
3392
below values, the
3393
slurmd daemon will direct its logs to the logfile and
3394
to the syslog at that level of detail (logfile will receive
3395
at level specified in \fBSlurmdDebug\fR).
3396
If the slurmd daemon is run in the foreground, it will log
3397
into only the logfile.  Default is \fBquiet\fR.
3398
3399
.RS
3400
.TP 10
3401
\fBquiet\fR
3402
Log nothing
3403
.TP
3404
\fBfatal\fR
3405
Log only fatal errors
3406
.TP
3407
\fBerror\fR
3408
Log only errors
3409
.TP
3410
\fBinfo\fR
3411
Log errors and general informational messages
3412
.TP
3413
\fBverbose\fR
3414
Log errors and verbose informational messages
3415
.TP
3416
\fBdebug\fR
3417
Log errors and verbose informational messages and debugging messages
3418
.TP
3419
\fBdebug2\fR
3420
Log errors and verbose informational messages and more debugging messages
3421
.TP
3422
\fBdebug3\fR
3423
Log errors and verbose informational messages and even more debugging messages
3424
.TP
3425
\fBdebug4\fR
3426
Log errors and verbose informational messages and even more debugging messages
3427
.TP
3428
\fBdebug5\fR
3429
Log errors and verbose informational messages and even more debugging messages
3430
.RE
3431
3432
.TP
3346
\fBSlurmdTimeout\fR
3433
\fBSlurmdTimeout\fR
3347
The interval, in seconds, that the Slurm controller waits for \fBslurmd\fR
3434
The interval, in seconds, that the Slurm controller waits for \fBslurmd\fR
3348
to respond before configuring that node's state to DOWN.
3435
to respond before configuring that node's state to DOWN.
(-)a/doc/man/man5/slurmdbd.conf.5 (+44 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 to any of
273
below values, the
274
slurmdbd daemon will direct its logs to the logfile and
275
to the syslog at that level of detail (logfile will receive
276
at level specified in \fBDebugLevel\fR).
277
If the slurmdbd daemon is run in the foreground, it will log
278
into only the logfile.  Default is \fBquiet\fR.
279
280
.RS
281
.TP 10
282
\fBquiet\fR
283
Log nothing
284
.TP
285
\fBfatal\fR
286
Log only fatal errors
287
.TP
288
\fBerror\fR
289
Log only errors
290
.TP
291
\fBinfo\fR
292
Log errors and general informational messages
293
.TP
294
\fBverbose\fR
295
Log errors and verbose informational messages
296
.TP
297
\fBdebug\fR
298
Log errors and verbose informational messages and debugging messages
299
.TP
300
\fBdebug2\fR
301
Log errors and verbose informational messages and more debugging messages
302
.TP
303
\fBdebug3\fR
304
Log errors and verbose informational messages and even more debugging messages
305
.TP
306
\fBdebug4\fR
307
Log errors and verbose informational messages and even more debugging messages
308
.TP
309
\fBdebug5\fR
310
Log errors and verbose informational messages and even more debugging messages
311
.RE
312
313
314
.TP
271
\fBDefaultQOS\fR
315
\fBDefaultQOS\fR
272
When adding a new cluster this will be used as the qos for the cluster
316
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.
317
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
	uint16_t 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
	uint16_t 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/api/config_info.c (+14 lines)
Lines 1457-1462 extern void *slurm_ctl_conf_2_key_pairs (slurm_ctl_conf_t* slurm_ctl_conf_ptr) Link Here
1457
	key_pair->value = xstrdup(tmp_str);
1457
	key_pair->value = xstrdup(tmp_str);
1458
	list_append(ret_list, key_pair);
1458
	list_append(ret_list, key_pair);
1459
1459
1460
	snprintf(tmp_str, sizeof(tmp_str), "%s",
1461
		 log_num2string(slurm_ctl_conf_ptr->slurmctld_syslog_debug));
1462
	key_pair = xmalloc(sizeof(config_key_pair_t));
1463
	key_pair->name = xstrdup("SlurmctldSyslogDebug");
1464
	key_pair->value = xstrdup(tmp_str);
1465
	list_append(ret_list, key_pair);
1466
1460
	snprintf(tmp_str, sizeof(tmp_str), "%u sec",
1467
	snprintf(tmp_str, sizeof(tmp_str), "%u sec",
1461
		 slurm_ctl_conf_ptr->slurmctld_timeout);
1468
		 slurm_ctl_conf_ptr->slurmctld_timeout);
1462
	key_pair = xmalloc(sizeof(config_key_pair_t));
1469
	key_pair = xmalloc(sizeof(config_key_pair_t));
Lines 1498-1503 extern void *slurm_ctl_conf_2_key_pairs (slurm_ctl_conf_t* slurm_ctl_conf_ptr) Link Here
1498
	key_pair->value = xstrdup(slurm_ctl_conf_ptr->slurmd_spooldir);
1505
	key_pair->value = xstrdup(slurm_ctl_conf_ptr->slurmd_spooldir);
1499
	list_append(ret_list, key_pair);
1506
	list_append(ret_list, key_pair);
1500
1507
1508
	snprintf(tmp_str, sizeof(tmp_str), "%s",
1509
		 log_num2string(slurm_ctl_conf_ptr->slurmd_syslog_debug));
1510
	key_pair = xmalloc(sizeof(config_key_pair_t));
1511
	key_pair->name = xstrdup("SlurmdSyslogDebug");
1512
	key_pair->value = xstrdup(tmp_str);
1513
	list_append(ret_list, key_pair);
1514
1501
	snprintf(tmp_str, sizeof(tmp_str), "%u sec",
1515
	snprintf(tmp_str, sizeof(tmp_str), "%u sec",
1502
		 slurm_ctl_conf_ptr->slurmd_timeout);
1516
		 slurm_ctl_conf_ptr->slurmd_timeout);
1503
	key_pair = xmalloc(sizeof(config_key_pair_t));
1517
	key_pair = xmalloc(sizeof(config_key_pair_t));
(-)a/src/common/read_config.c (-1 / +27 lines)
Lines 96-102 strong_alias(sort_key_pairs, slurm_sort_key_pairs); Link Here
96
strong_alias(run_in_daemon, slurm_run_in_daemon);
96
strong_alias(run_in_daemon, slurm_run_in_daemon);
97
97
98
/*
98
/*
99
 * Instantiation of the "extern slurm_ctl_conf_t slurmcltd_conf" and
99
 * Instantiation of the "extern slurm_ctl_conf_t slurmctld_conf" and
100
 * "bool ignore_state_errors" found in slurmctld.h
100
 * "bool ignore_state_errors" found in slurmctld.h
101
 */
101
 */
102
slurm_ctl_conf_t slurmctld_conf;
102
slurm_ctl_conf_t slurmctld_conf;
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
	ctl_conf_ptr->slurmctld_syslog_debug    = (uint16_t) NO_VAL;
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
	ctl_conf_ptr->slurmd_syslog_debug       = (uint16_t) NO_VAL;
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(&temp_str, "SlurmctldSyslogDebug", hashtbl)) {
4099
		conf->slurmctld_syslog_debug = log_string2num(temp_str);
4100
		if (conf->slurmctld_syslog_debug == (uint16_t) NO_VAL) {
4101
			error("Invalid SlurmctldSyslogDebug %s", temp_str);
4102
			return SLURM_ERROR;
4103
		}
4104
		xfree(temp_str);
4105
		_normalize_debug_level(&conf->slurmctld_syslog_debug);
4106
	} else
4107
		conf->slurmctld_syslog_debug = 0;
4108
4094
	if (s_p_get_string(&temp_str, "SlurmctldPort", hashtbl)) {
4109
	if (s_p_get_string(&temp_str, "SlurmctldPort", hashtbl)) {
4095
		char *end_ptr = NULL;
4110
		char *end_ptr = NULL;
4096
		long port_long;
4111
		long port_long;
Lines 4164-4169 _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) Link Here
4164
	if (!s_p_get_string(&conf->slurmd_spooldir, "SlurmdSpoolDir", hashtbl))
4179
	if (!s_p_get_string(&conf->slurmd_spooldir, "SlurmdSpoolDir", hashtbl))
4165
		conf->slurmd_spooldir = xstrdup(DEFAULT_SPOOLDIR);
4180
		conf->slurmd_spooldir = xstrdup(DEFAULT_SPOOLDIR);
4166
4181
4182
	if (s_p_get_string(&temp_str, "SlurmdSyslogDebug", hashtbl)) {
4183
		conf->slurmd_syslog_debug = log_string2num(temp_str);
4184
		if (conf->slurmd_syslog_debug == (uint16_t) NO_VAL) {
4185
			error("Invalid SlurmdSyslogDebug %s", temp_str);
4186
			return SLURM_ERROR;
4187
		}
4188
		xfree(temp_str);
4189
		_normalize_debug_level(&conf->slurmd_syslog_debug);
4190
	} else
4191
		conf->slurmd_syslog_debug = 0;
4192
4167
	if (!s_p_get_uint16(&conf->slurmd_timeout, "SlurmdTimeout", hashtbl))
4193
	if (!s_p_get_uint16(&conf->slurmd_timeout, "SlurmdTimeout", hashtbl))
4168
		conf->slurmd_timeout = DEFAULT_SLURMD_TIMEOUT;
4194
		conf->slurmd_timeout = DEFAULT_SLURMD_TIMEOUT;
4169
4195
(-)a/src/common/slurm_protocol_pack.c (+4 lines)
Lines 6535-6540 _pack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t * build_ptr, Buf buffer, Link Here
6535
		packstr(build_ptr->slurmctld_plugstack, buffer);
6535
		packstr(build_ptr->slurmctld_plugstack, buffer);
6536
		pack32(build_ptr->slurmctld_port, buffer);
6536
		pack32(build_ptr->slurmctld_port, buffer);
6537
		pack16(build_ptr->slurmctld_port_count, buffer);
6537
		pack16(build_ptr->slurmctld_port_count, buffer);
6538
		pack16(build_ptr->slurmctld_syslog_debug, buffer);
6538
		pack16(build_ptr->slurmctld_timeout, buffer);
6539
		pack16(build_ptr->slurmctld_timeout, buffer);
6539
6540
6540
		pack16(build_ptr->slurmd_debug, buffer);
6541
		pack16(build_ptr->slurmd_debug, buffer);
Lines 6544-6549 _pack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t * build_ptr, Buf buffer, Link Here
6544
		pack32(build_ptr->slurmd_port, buffer);
6545
		pack32(build_ptr->slurmd_port, buffer);
6545
6546
6546
		packstr(build_ptr->slurmd_spooldir, buffer);
6547
		packstr(build_ptr->slurmd_spooldir, buffer);
6548
		pack16(build_ptr->slurmd_syslog_debug, buffer);
6547
		pack16(build_ptr->slurmd_timeout, buffer);
6549
		pack16(build_ptr->slurmd_timeout, buffer);
6548
		packstr(build_ptr->srun_epilog, buffer);
6550
		packstr(build_ptr->srun_epilog, buffer);
6549
		pack16(build_ptr->srun_port_range[0], buffer);
6551
		pack16(build_ptr->srun_port_range[0], buffer);
Lines 7499-7504 _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t **build_buffer_ptr, Link Here
7499
				       &uint32_tmp, buffer);
7501
				       &uint32_tmp, buffer);
7500
		safe_unpack32(&build_ptr->slurmctld_port, buffer);
7502
		safe_unpack32(&build_ptr->slurmctld_port, buffer);
7501
		safe_unpack16(&build_ptr->slurmctld_port_count, buffer);
7503
		safe_unpack16(&build_ptr->slurmctld_port_count, buffer);
7504
		safe_unpack16(&build_ptr->slurmctld_syslog_debug, buffer);
7502
		safe_unpack16(&build_ptr->slurmctld_timeout, buffer);
7505
		safe_unpack16(&build_ptr->slurmctld_timeout, buffer);
7503
7506
7504
		safe_unpack16(&build_ptr->slurmd_debug, buffer);
7507
		safe_unpack16(&build_ptr->slurmd_debug, buffer);
Lines 7512-7517 _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t **build_buffer_ptr, Link Here
7512
7515
7513
		safe_unpackstr_xmalloc(&build_ptr->slurmd_spooldir,
7516
		safe_unpackstr_xmalloc(&build_ptr->slurmd_spooldir,
7514
				       &uint32_tmp, buffer);
7517
				       &uint32_tmp, buffer);
7518
		safe_unpack16(&build_ptr->slurmd_syslog_debug, buffer);
7515
		safe_unpack16(&build_ptr->slurmd_timeout, buffer);
7519
		safe_unpack16(&build_ptr->slurmd_timeout, buffer);
7516
7520
7517
		safe_unpackstr_xmalloc(&build_ptr->srun_epilog,
7521
		safe_unpackstr_xmalloc(&build_ptr->srun_epilog,
(-)a/src/slurmctld/controller.c (-2 / +7 lines)
Lines 2553-2560 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
			log_opts.syslog_level = LOG_LEVEL_FATAL;
2557
			if (!slurmctld_conf.slurmctld_syslog_debug)
2558
				log_opts.syslog_level = LOG_LEVEL_FATAL;
2559
			else
2560
				log_opts.syslog_level =
2561
					slurmctld_conf.slurmctld_syslog_debug;
2562
		}
2558
	} else
2563
	} else
2559
		log_opts.syslog_level = LOG_LEVEL_QUIET;
2564
		log_opts.syslog_level = LOG_LEVEL_QUIET;
2560
2565
(-)a/src/slurmctld/proc_req.c (+2 lines)
Lines 842-847 static void _fill_ctld_conf(slurm_ctl_conf_t * conf_ptr) Link Here
842
	conf_ptr->slurmctld_plugstack = xstrdup(conf->slurmctld_plugstack);
842
	conf_ptr->slurmctld_plugstack = xstrdup(conf->slurmctld_plugstack);
843
	conf_ptr->slurmctld_port      = conf->slurmctld_port;
843
	conf_ptr->slurmctld_port      = conf->slurmctld_port;
844
	conf_ptr->slurmctld_port_count = conf->slurmctld_port_count;
844
	conf_ptr->slurmctld_port_count = conf->slurmctld_port_count;
845
	conf_ptr->slurmctld_syslog_debug = conf->slurmctld_syslog_debug;
845
	conf_ptr->slurmctld_timeout   = conf->slurmctld_timeout;
846
	conf_ptr->slurmctld_timeout   = conf->slurmctld_timeout;
846
	conf_ptr->slurmd_debug        = conf->slurmd_debug;
847
	conf_ptr->slurmd_debug        = conf->slurmd_debug;
847
	conf_ptr->slurmd_logfile      = xstrdup(conf->slurmd_logfile);
848
	conf_ptr->slurmd_logfile      = xstrdup(conf->slurmd_logfile);
Lines 849-854 static void _fill_ctld_conf(slurm_ctl_conf_t * conf_ptr) Link Here
849
	conf_ptr->slurmd_plugstack    = xstrdup(conf->slurmd_plugstack);
850
	conf_ptr->slurmd_plugstack    = xstrdup(conf->slurmd_plugstack);
850
	conf_ptr->slurmd_port         = conf->slurmd_port;
851
	conf_ptr->slurmd_port         = conf->slurmd_port;
851
	conf_ptr->slurmd_spooldir     = xstrdup(conf->slurmd_spooldir);
852
	conf_ptr->slurmd_spooldir     = xstrdup(conf->slurmd_spooldir);
853
	conf_ptr->slurmd_syslog_debug = conf->slurmd_syslog_debug;
852
	conf_ptr->slurmd_timeout      = conf->slurmd_timeout;
854
	conf_ptr->slurmd_timeout      = conf->slurmd_timeout;
853
	conf_ptr->slurmd_user_id      = conf->slurmd_user_id;
855
	conf_ptr->slurmd_user_id      = conf->slurmd_user_id;
854
	conf_ptr->slurmd_user_name    = xstrdup(conf->slurmd_user_name);
856
	conf_ptr->slurmd_user_name    = xstrdup(conf->slurmd_user_name);
(-)a/src/slurmd/slurmd/slurmd.c (-1 / +9 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 = 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  = %d",     cf->slurmd_syslog_debug);
1195
	debug3("HealthCheck = `%s'",     conf->health_check_program);
1199
	debug3("HealthCheck = `%s'",     conf->health_check_program);
1196
	debug3("NodeName    = %s",       conf->node_name);
1200
	debug3("NodeName    = %s",       conf->node_name);
1197
	debug3("NodeAddr    = %s",       conf->node_addr);
1201
	debug3("NodeAddr    = %s",       conf->node_addr);
Lines 1940-1947 static void _update_logging(void) Link Here
1940
	 */
1944
	 */
1941
	if (conf->daemonize) {
1945
	if (conf->daemonize) {
1942
		o->stderr_level = LOG_LEVEL_QUIET;
1946
		o->stderr_level = LOG_LEVEL_QUIET;
1943
		if (conf->logfile)
1947
		if (conf->logfile) {
1948
		   if (!conf->syslog_debug) {
1944
			o->syslog_level = LOG_LEVEL_FATAL;
1949
			o->syslog_level = LOG_LEVEL_FATAL;
1950
		   } else
1951
			o->syslog_level = conf->syslog_debug;
1952
		}
1945
	} else
1953
	} else
1946
		o->syslog_level  = LOG_LEVEL_QUIET;
1954
		o->syslog_level  = LOG_LEVEL_QUIET;
1947
1955
(-)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
	int          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 (+15 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
		slurmdbd_conf->syslog_debug = 0;
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(&temp_str, "DebugLevelSyslog", tbl)) {
272
			slurmdbd_conf->syslog_debug = log_string2num(temp_str);
273
			if (slurmdbd_conf->syslog_debug == (uint16_t) NO_VAL)
274
				fatal("Invalid DebugLevelSyslog %s", temp_str);
275
			xfree(temp_str);
276
		}
277
269
		if (s_p_get_string(&temp_str, "LogTimeFormat", tbl)) {
278
		if (s_p_get_string(&temp_str, "LogTimeFormat", tbl)) {
270
			if (xstrcasestr(temp_str, "iso8601_ms"))
279
			if (xstrcasestr(temp_str, "iso8601_ms"))
271
				slurmdbd_conf->log_fmt = LOG_FMT_ISO8601_MS;
280
				slurmdbd_conf->log_fmt = LOG_FMT_ISO8601_MS;
Lines 622-627 extern void log_config(void) Link Here
622
	debug2("DebugFlags        = %s", tmp_ptr);
631
	debug2("DebugFlags        = %s", tmp_ptr);
623
	xfree(tmp_ptr);
632
	xfree(tmp_ptr);
624
	debug2("DebugLevel        = %u", slurmdbd_conf->debug_level);
633
	debug2("DebugLevel        = %u", slurmdbd_conf->debug_level);
634
	debug2("DebugLevelSyslog  = %u", slurmdbd_conf->syslog_debug);
625
	debug2("DefaultQOS        = %s", slurmdbd_conf->default_qos);
635
	debug2("DefaultQOS        = %s", slurmdbd_conf->default_qos);
626
636
627
	debug2("LogFile           = %s", slurmdbd_conf->log_file);
637
	debug2("LogFile           = %s", slurmdbd_conf->log_file);
Lines 818-823 extern List dump_config(void) Link Here
818
	list_append(my_list, key_pair);
828
	list_append(my_list, key_pair);
819
829
820
	key_pair = xmalloc(sizeof(config_key_pair_t));
830
	key_pair = xmalloc(sizeof(config_key_pair_t));
831
	key_pair->name = xstrdup("DebugLevelSyslog");
832
	key_pair->value = xstrdup(log_num2string(slurmdbd_conf->syslog_debug));
833
	list_append(my_list, key_pair);
834
835
	key_pair = xmalloc(sizeof(config_key_pair_t));
821
	key_pair->name = xstrdup("DefaultQOS");
836
	key_pair->name = xstrdup("DefaultQOS");
822
	key_pair->value = xstrdup(slurmdbd_conf->default_qos);
837
	key_pair->value = xstrdup(slurmdbd_conf->default_qos);
823
	list_append(my_list, key_pair);
838
	list_append(my_list, key_pair);
(-)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
	uint16_t	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 (-2 / +7 lines)
Lines 524-531 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
			log_opts.syslog_level = LOG_LEVEL_QUIET;
528
			if (!slurmdbd_conf->syslog_debug)
529
				log_opts.syslog_level = LOG_LEVEL_QUIET;
530
			else
531
				log_opts.syslog_level =
532
					slurmdbd_conf->syslog_debug;
533
		}
529
	}
534
	}
530
535
531
	log_alter(log_opts, SYSLOG_FACILITY_DAEMON, slurmdbd_conf->log_file);
536
	log_alter(log_opts, SYSLOG_FACILITY_DAEMON, slurmdbd_conf->log_file);

Return to ticket 3933