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

(-)a/src/srun/libsrun/allocate.c (+26 lines)
Lines 106-111 static int _wait_nodes_ready(resource_allocation_response_msg_t *alloc); Link Here
106
106
107
static sig_atomic_t destroy_job = 0;
107
static sig_atomic_t destroy_job = 0;
108
108
109
/*
110
 * Validates the given node_list against the nodes in the conf.
111
 * Returns true if all nodes in node_list are in the conf.
112
 */
113
static bool _hostlist_in_conf(char *node_list)
114
{
115
	char *host;
116
	hostset_t names         = hostset_create(node_list);
117
	hostlist_iterator_t itr = hostset_iterator_create(names);
118
	bool all_exist = true;
119
	while ((host = hostlist_next(itr))) {
120
		if (!slurm_conf_get_hostname(host)) {
121
			all_exist = false;
122
			break;
123
		}
124
	}
125
	hostlist_iterator_destroy(itr);
126
	hostset_destroy(names);
127
	return all_exist;
128
}
129
109
static void _set_pending_job_id(uint32_t job_id)
130
static void _set_pending_job_id(uint32_t job_id)
110
{
131
{
111
	debug2("Pending job allocation %u", job_id);
132
	debug2("Pending job allocation %u", job_id);
Lines 472-477 allocate_nodes(bool handle_signals) Link Here
472
	}
493
	}
473
494
474
	if (resp && !destroy_job) {
495
	if (resp && !destroy_job) {
496
497
		/* reload conf if a node is not in conf yet. */
498
		if (!_hostlist_in_conf(resp->node_list))
499
			slurm_conf_reinit(NULL);
500
475
		/*
501
		/*
476
		 * Allocation granted!
502
		 * Allocation granted!
477
		 */
503
		 */

Return to ticket 1333