Skip to content
Snippets Groups Projects
Commit 4945d049 authored by Danny Auble's avatar Danny Auble
Browse files

fed_mgr - Change it so update messages don't automatically connect

to siblings (If not already connected).
This will happen when the next message is sent to them.
parent 4c30a972
No related branches found
No related tags found
No related merge requests found
......@@ -466,7 +466,8 @@ static void _persist_callback_fini(void *arg)
}
static void _join_federation(slurmdb_federation_rec_t *fed,
slurmdb_cluster_rec_t *cluster)
slurmdb_cluster_rec_t *cluster,
bool update)
{
slurmctld_lock_t fed_read_lock = {
NO_LOCK, NO_LOCK, NO_LOCK, NO_LOCK, READ_LOCK };
......@@ -476,9 +477,11 @@ static void _join_federation(slurmdb_federation_rec_t *fed,
/* We must open the connections after we get out of the
* write_lock or we will end up in deadlock.
*/
lock_slurmctld(fed_read_lock);
_open_persist_sends();
unlock_slurmctld(fed_read_lock);
if (!update) {
lock_slurmctld(fed_read_lock);
_open_persist_sends();
unlock_slurmctld(fed_read_lock);
}
_create_ping_thread();
}
......@@ -536,7 +539,7 @@ extern int fed_mgr_init(void *db_conn)
if ((cluster = list_find_first(fed->cluster_list,
slurmdb_find_cluster_in_list,
slurmctld_cluster_name))) {
_join_federation(fed, cluster);
_join_federation(fed, cluster, false);
} else {
error("failed to get cluster from federation that we request");
rc = SLURM_ERROR;
......@@ -608,7 +611,7 @@ extern int fed_mgr_update_feds(slurmdb_update_object_t *update)
(cluster = list_find_first(fed->cluster_list,
slurmdb_find_cluster_in_list,
slurmctld_cluster_name))) {
_join_federation(fed, cluster);
_join_federation(fed, cluster, true);
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment