]> granicus.if.org Git - icinga2/commitdiff
Cluster: Delete object message should log that 6917/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Mon, 28 Jan 2019 16:39:22 +0000 (17:39 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Mon, 28 Jan 2019 16:39:22 +0000 (17:39 +0100)
Atm it is a copy-paste error and irritates during debugging.
Coming from my analysis of existing cluster messages.

lib/remote/apilistener-configsync.cpp

index 1cac5b39e51414beaa1cddd49fe33e15e7d8deb8..2612e67fc1bd0aa9ac6b48c35eb812abe116a64e 100644 (file)
@@ -199,7 +199,7 @@ Value ApiListener::ConfigUpdateObjectAPIHandler(const MessageOrigin::Ptr& origin
 Value ApiListener::ConfigDeleteObjectAPIHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params)
 {
        Log(LogNotice, "ApiListener")
-               << "Received update for object: " << JsonEncode(params);
+               << "Received delete for object: " << JsonEncode(params);
 
        /* check permissions */
        ApiListener::Ptr listener = ApiListener::GetInstance();
@@ -209,7 +209,7 @@ Value ApiListener::ConfigDeleteObjectAPIHandler(const MessageOrigin::Ptr& origin
 
        if (!listener->GetAcceptConfig()) {
                Log(LogWarning, "ApiListener")
-                       << "Ignoring config update. '" << listener->GetName() << "' does not accept config.";
+                       << "Ignoring config delete. '" << listener->GetName() << "' does not accept config.";
                return Empty;
        }
 
@@ -217,14 +217,14 @@ Value ApiListener::ConfigDeleteObjectAPIHandler(const MessageOrigin::Ptr& origin
 
        if (!endpoint) {
                Log(LogNotice, "ApiListener")
-                       << "Discarding 'config update object' message from '" << origin->FromClient->GetIdentity() << "': Invalid endpoint origin (client not allowed).";
+                       << "Discarding 'config delete object' message from '" << origin->FromClient->GetIdentity() << "': Invalid endpoint origin (client not allowed).";
                return Empty;
        }
 
        /* discard messages if the sender is in a child zone */
        if (!Zone::GetLocalZone()->IsChildOf(endpoint->GetZone())) {
                Log(LogNotice, "ApiListener")
-                       << "Discarding 'config update object' message from '"
+                       << "Discarding 'config delete object' message from '"
                        << origin->FromClient->GetIdentity() << "'.";
                return Empty;
        }