mirror of https://github.com/Icinga/icinga2.git
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
This commit is contained in:
parent
7dc3d28eaf
commit
f2c3bffdd9
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue