Cluster sync: Don't load/sync the .authoritative config file marker

This would influence everything else, and it isn't needed anywhere
but the master instance (zones.d -> var-zones).
This commit is contained in:
Michael Friedrich 2019-06-06 17:45:43 +02:00
parent 0aa6f1a3b3
commit 3852c51c9f
1 changed files with 8 additions and 1 deletions

View File

@ -684,6 +684,10 @@ ConfigDirInformation ApiListener::LoadConfigDir(const String& dir)
*/
void ApiListener::ConfigGlobHandler(ConfigDirInformation& config, const String& path, const String& file)
{
/* Avoid loading the authoritative marker for syncs. */
if (Utility::BaseName(file) == ".authoritative")
return;
CONTEXT("Creating config update for file '" + file + "'");
Log(LogNotice, "ApiListener")
@ -710,7 +714,10 @@ void ApiListener::ConfigGlobHandler(ConfigDirInformation& config, const String&
update->Set(relativePath, content);
/* Calculate a checksum for each file (and a global one later). */
/* Calculate a checksum for each file (and a global one later).
*
* IMPORTANT: Ignore the .authoritative file, this will not be synced.
* */
config.Checksums->Set(relativePath, GetChecksum(content));
}