]> granicus.if.org Git - icinga2/commitdiff
Config sync does not set endpoint syncing and plays disconnect-sync ping-pong
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 30 Sep 2015 14:14:04 +0000 (16:14 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 30 Sep 2015 14:14:04 +0000 (16:14 +0200)
fixes #10255

lib/remote/apilistener.cpp

index b8b879dbd57e7b8b7316b815368a5fd255810ecb..c14abacc748f27d46ace7f0c078e4ebd54898694 100644 (file)
@@ -375,11 +375,6 @@ 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);
@@ -387,6 +382,17 @@ void ApiListener::NewClientHandlerInternal(const Socket::Ptr& client, const Stri
                                        endpoint->SetSyncing(true);
                                }
 
+                               Log(LogInformation, "ApiListener")
+                                   << "Sending updates for endpoint '" << endpoint->GetName() << "'.";
+
+                               /* sync zone file config */
+                               SendConfigUpdate(aclient);
+                               /* sync runtime config */
+                               SendRuntimeConfigObjects(aclient);
+
+                               Log(LogInformation, "ApiListener")
+                                   << "Finished sending updates for endpoint '" << endpoint->GetName() << "'.";
+
                                ReplayLog(aclient);
                        }
                } else