Merge pull request #7870 from Icinga/bugfix/last-zone-sync-stage-validation-failed-7642

Clear ApiListener#last_failed_zones_stage_validation on config::Update if config not changed
This commit is contained in:
Alexander Aleksandrovič Klimov 2020-10-19 12:31:01 +02:00 committed by GitHub
commit f60ae93717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -314,7 +314,7 @@ Value ApiListener::ConfigUpdateHandler(const MessageOrigin::Ptr& origin, const D
std::thread([origin, params, listener]() {
try {
HandleConfigUpdate(origin, params);
listener->HandleConfigUpdate(origin, params);
} catch (const std::exception& ex) {
auto msg ("Exception during config sync: " + DiagnosticInformation(ex));
@ -543,6 +543,7 @@ void ApiListener::HandleConfigUpdate(const MessageOrigin::Ptr& origin, const Dic
Log(LogInformation, "ApiListener")
<< "Received configuration updates (" << count << ") from endpoint '" << fromEndpointName
<< "' are equal to production, skipping validation and reload.";
ClearLastFailedZonesStageValidation();
}
}

View File

@ -87,7 +87,7 @@ public:
/* filesync */
static Value ConfigUpdateHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params);
static void HandleConfigUpdate(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params);
void HandleConfigUpdate(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params);
/* configsync */
static void ConfigUpdateObjectHandler(const ConfigObject::Ptr& object, const Value& cookie);