1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #: fix HA race condition (#672)

Fix race condition when a node fails to became leader due to
another node having greater term.
This commit is contained in:
Christian González 2021-01-19 17:56:43 +01:00 committed by GitHub
parent 2d0412e38a
commit 17d4266b7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -472,13 +472,13 @@ void RaftManager::leader()
clock_gettime(CLOCK_REALTIME, &last_heartbeat);
auto im = nd.get_im();
im->raft_status(state);
pthread_mutex_unlock(&mutex);
aclm->reload_rules();
auto im = nd.get_im();
im->raft_status(state);
if ( nd.is_federation_master() )
{
frm->start_replica_threads();