View | Details | Raw Unified | Return to ticket 15357
Collapse All | Expand All

(-)a/doc/man/man5/slurm.conf.5 (+9 lines)
Lines 4693-4698 second argument. Link Here
4693
.TP
4693
.TP
4694
\fBuser_resv_delete\fR
4694
\fBuser_resv_delete\fR
4695
Allow any user able to run in a reservation to delete it.
4695
Allow any user able to run in a reservation to delete it.
4696
.IP
4697
4698
.TP
4699
\fBvalidate_nodeaddr_threads=\fR
4700
During startup, slurmctld looks up the address for each compute node in the
4701
system. On large systems this can cause considerable delay, this option permits
4702
the slurmctld to concurrently handle the lookup calls and can reduce system
4703
startup time considerably.  The default value is 1. Maximum permitted value is
4704
64.
4696
.RE
4705
.RE
4697
.IP
4706
.IP
4698
4707
(-)a/src/slurmctld/read_config.c (-15 / +49 lines)
Lines 442-447 static int _set_share_node_bitmap(void *x, void *arg) Link Here
442
	return 0;
442
	return 0;
443
}
443
}
444
444
445
static void *_set_node_addrs(void *arg)
446
{
447
	list_t *nodes = arg;
448
	slurm_addr_t slurm_addr;
449
	node_record_t *node_ptr;
450
451
	while ((node_ptr = list_pop(nodes))) {
452
		slurm_set_addr(&slurm_addr, node_ptr->port,
453
			       node_ptr->comm_name);
454
		if (slurm_get_port(&slurm_addr))
455
			continue;
456
		error("%s: failure on %s", __func__, node_ptr->comm_name);
457
		node_ptr->node_state = NODE_STATE_FUTURE;
458
		node_ptr->port = 0;
459
		xfree(node_ptr->reason);
460
		node_ptr->reason = xstrdup("NO NETWORK ADDRESS FOUND");
461
		node_ptr->reason_time = time(NULL);
462
		node_ptr->reason_uid = slurm_conf.slurm_user_id;
463
	}
464
465
	return NULL;
466
}
467
445
/*
468
/*
446
 * Validate that nodes are addressable.
469
 * Validate that nodes are addressable.
447
 */
470
 */
Lines 449-460 static void _validate_slurmd_addr(void) Link Here
449
{
472
{
450
#ifndef HAVE_FRONT_END
473
#ifndef HAVE_FRONT_END
451
	node_record_t *node_ptr;
474
	node_record_t *node_ptr;
452
	slurm_addr_t slurm_addr;
453
	DEF_TIMERS;
475
	DEF_TIMERS;
454
476
	pthread_t *work_threads;
477
	int threads_num = 1;
478
	char *temp_str;
479
	list_t *nodes = list_create(NULL);
455
	xassert(verify_lock(CONF_LOCK, READ_LOCK));
480
	xassert(verify_lock(CONF_LOCK, READ_LOCK));
456
481
457
	START_TIMER;
482
	START_TIMER;
483
484
	if ((temp_str = xstrcasestr(slurm_conf.slurmctld_params,
485
				    "validate_nodeaddr_threads="))) {
486
		int tmp_val = strtol(temp_str + 26, NULL, 10);
487
		if ((tmp_val >= 1) && (tmp_val <= 64))
488
			threads_num = tmp_val;
489
		else
490
			error("SlurmctldParameters option validate_nodeaddr_threads=%d out of range, ignored",
491
			      tmp_val);
492
	}
493
494
458
	for (int i = 0; (node_ptr = next_node(&i)); i++) {
495
	for (int i = 0; (node_ptr = next_node(&i)); i++) {
459
		if ((node_ptr->name == NULL) ||
496
		if ((node_ptr->name == NULL) ||
460
		    (node_ptr->name[0] == '\0'))
497
		    (node_ptr->name[0] == '\0'))
Lines 467-485 static void _validate_slurmd_addr(void) Link Here
467
				continue;
504
				continue;
468
		if (node_ptr->port == 0)
505
		if (node_ptr->port == 0)
469
			node_ptr->port = slurm_conf.slurmd_port;
506
			node_ptr->port = slurm_conf.slurmd_port;
470
		slurm_set_addr(&slurm_addr, node_ptr->port,
507
		list_append(nodes, node_ptr);
471
			       node_ptr->comm_name);
472
		if (slurm_get_port(&slurm_addr))
473
			continue;
474
		error("%s: failure on %s", __func__, node_ptr->comm_name);
475
		node_ptr->node_state = NODE_STATE_FUTURE;
476
		node_ptr->port = 0;
477
		xfree(node_ptr->reason);
478
		node_ptr->reason = xstrdup("NO NETWORK ADDRESS FOUND");
479
		node_ptr->reason_time = time(NULL);
480
		node_ptr->reason_uid = slurm_conf.slurm_user_id;
481
	}
508
	}
482
509
510
	work_threads = xcalloc(threads_num, sizeof(pthread_t));
511
	for (int i = 0; i < threads_num; i++)
512
		slurm_thread_create(&work_threads[i], _set_node_addrs, nodes);
513
	for (int i = 0; i < threads_num; i++)
514
		pthread_join(work_threads[i], NULL);
515
	xfree(work_threads);
516
	xassert(list_is_empty(nodes));
517
	FREE_NULL_LIST(nodes);
518
483
	END_TIMER2("_validate_slurmd_addr");
519
	END_TIMER2("_validate_slurmd_addr");
484
#endif
520
#endif
485
}
521
}
486
- 
487
--
488
src/slurmctld/read_config.c | 4 ++--
522
src/slurmctld/read_config.c | 4 ++--
489
1 file changed, 2 insertions(+), 2 deletions(-)
523
1 file changed, 2 insertions(+), 2 deletions(-)
(-)a/src/slurmctld/read_config.c (-3 / +2 lines)
Lines 444-450 static int _set_share_node_bitmap(void *x, void *arg) Link Here
444
444
445
static void *_set_node_addrs(void *arg)
445
static void *_set_node_addrs(void *arg)
446
{
446
{
447
	list_t *nodes = arg;
447
	List nodes = arg;
448
	slurm_addr_t slurm_addr;
448
	slurm_addr_t slurm_addr;
449
	node_record_t *node_ptr;
449
	node_record_t *node_ptr;
450
450
Lines 476-482 static void _validate_slurmd_addr(void) Link Here
476
	pthread_t *work_threads;
476
	pthread_t *work_threads;
477
	int threads_num = 1;
477
	int threads_num = 1;
478
	char *temp_str;
478
	char *temp_str;
479
	list_t *nodes = list_create(NULL);
479
	List nodes = list_create(NULL);
480
	xassert(verify_lock(CONF_LOCK, READ_LOCK));
480
	xassert(verify_lock(CONF_LOCK, READ_LOCK));
481
481
482
	START_TIMER;
482
	START_TIMER;
483
- 

Return to ticket 15357