From: Michael Friedrich Date: Fri, 18 Sep 2015 08:05:34 +0000 (+0200) Subject: Sync cluster config before replaying the logs X-Git-Tag: v2.4.0~311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2c3bffdd9533cf59a9feb4c808e545ff32f2956;p=icinga2 Sync cluster config before replaying the logs If there were objects added at runtime (either through direct api creation or by using the config file management api) the newly created objects must be synced first, and then the stored historical data should be synced. refs #9927 refs #9100 --- diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index e25983332..7e45995e8 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -370,6 +370,11 @@ void ApiListener::NewClientHandlerInternal(const Socket::Ptr& client, const Stri if (endpoint) { endpoint->AddClient(aclient); + /* sync zone file config */ + SendConfigUpdate(aclient); + /* sync runtime config */ + SendRuntimeConfigObjects(aclient); + if (need_sync) { { ObjectLock olock(endpoint); @@ -379,11 +384,6 @@ void ApiListener::NewClientHandlerInternal(const Socket::Ptr& client, const Stri ReplayLog(aclient); } - - /* sync zone file config */ - SendConfigUpdate(aclient); - /* sync runtime config */ - SendRuntimeConfigObjects(aclient); } else AddAnonymousClient(aclient); } else {