]> granicus.if.org Git - icinga2/commitdiff
Avoid syncing .authorititative marker received from < 2.11 parent nodes bugfix/cluster-sync-authoritative-file-old-versions 7552/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Wed, 2 Oct 2019 08:49:02 +0000 (10:49 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Wed, 2 Oct 2019 08:49:02 +0000 (10:49 +0200)
lib/remote/apilistener-filesync.cpp

index 4aa381c431f032f3aef729fe7ff73e0dbf1ac0ed..f069e2623607bc90f699d0e40ac9d974d99a7841 100644 (file)
@@ -450,6 +450,10 @@ Value ApiListener::ConfigUpdateHandler(const MessageOrigin::Ptr& origin, const D
                                                << "Stage: Updating received configuration file '" << path << "' for zone '" << zoneName << "'.";
                                }
 
+                               // Parent nodes < 2.11 always send this, avoid this bug and deny its receival prior to writing it on disk.
+                               if (Utility::BaseName(path) == ".authoritative")
+                                       continue;
+
                                // Sync string content only.
                                String content = kv.second;