mirror of https://github.com/Icinga/icinga2.git
Improve logging for ignored config updates where we are authoritative for (config master)
This commit is contained in:
parent
efc2289178
commit
9df389a843
|
@ -376,9 +376,12 @@ Value ApiListener::ConfigUpdateHandler(const MessageOrigin::Ptr& origin, const D
|
||||||
*/
|
*/
|
||||||
boost::mutex::scoped_lock lock(m_ConfigSyncStageLock);
|
boost::mutex::scoped_lock lock(m_ConfigSyncStageLock);
|
||||||
|
|
||||||
|
String fromEndpointName = origin->FromClient->GetEndpoint()->GetName();
|
||||||
|
String fromZoneName = GetFromZoneName(origin->FromZone);
|
||||||
|
|
||||||
Log(LogInformation, "ApiListener")
|
Log(LogInformation, "ApiListener")
|
||||||
<< "Applying config update from endpoint '" << origin->FromClient->GetEndpoint()->GetName()
|
<< "Applying config update from endpoint '" << fromEndpointName
|
||||||
<< "' of zone '" << GetFromZoneName(origin->FromZone) << "'.";
|
<< "' of zone '" << fromZoneName << "'.";
|
||||||
|
|
||||||
Dictionary::Ptr updateV1 = params->Get("update");
|
Dictionary::Ptr updateV1 = params->Get("update");
|
||||||
Dictionary::Ptr updateV2 = params->Get("update_v2");
|
Dictionary::Ptr updateV2 = params->Get("update_v2");
|
||||||
|
@ -407,14 +410,16 @@ Value ApiListener::ConfigUpdateHandler(const MessageOrigin::Ptr& origin, const D
|
||||||
|
|
||||||
if (!zone) {
|
if (!zone) {
|
||||||
Log(LogWarning, "ApiListener")
|
Log(LogWarning, "ApiListener")
|
||||||
<< "Ignoring config update for unknown zone '" << zoneName << "'.";
|
<< "Ignoring config update from endpoint '" << fromEndpointName
|
||||||
|
<< "' for unknown zone '" << zoneName << "'.";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Whether we already have configuration in zones.d. */
|
/* Whether we already have configuration in zones.d. */
|
||||||
if (ConfigCompiler::HasZoneConfigAuthority(zoneName)) {
|
if (ConfigCompiler::HasZoneConfigAuthority(zoneName)) {
|
||||||
Log(LogWarning, "ApiListener")
|
Log(LogInformation, "ApiListener")
|
||||||
<< "Ignoring config update for zone '" << zoneName << "' because we have an authoritative version of the zone's config.";
|
<< "Ignoring config update from endpoint '" << fromEndpointName
|
||||||
|
<< "' for zone '" << zoneName << "' because we have an authoritative version of the zone's config.";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue