Pass the zonesVar override around

This commit is contained in:
Michael Friedrich 2018-09-27 18:49:49 +02:00
parent 2ed56b50a4
commit 1853254201
2 changed files with 7 additions and 7 deletions

View File

@ -143,14 +143,14 @@ bool DaemonUtility::ValidateConfigFiles(const std::vector<std::string>& configs,
return false;
/* Load cluster synchronized configuration files. This can be disabled for staged sync validations. */
bool ignoreZonesVarDir = false;
if (systemNS->Contains("IgnoreZonesVarDir")) {
ignoreZonesVarDir = Convert::ToBool(systemNS->Get("IgnoreZonesVarDir"));
}
String zonesVarDir = Configuration::DataDir + "/api/zones";
if (!ignoreZonesVarDir && Utility::PathExists(zonesVarDir))
/* Cluster config sync stage validation needs this. */
if (systemNS->Contains("ZonesStageVarDir")) {
zonesVarDir = systemNS->Get("ZonesStageVarDir");
}
if (Utility::PathExists(zonesVarDir))
Utility::Glob(zonesVarDir + "/*", std::bind(&IncludeNonLocalZone, _1, "_cluster", std::ref(success)), GlobDirectory);
if (!success)

View File

@ -396,7 +396,7 @@ void ApiListener::AsyncTryActivateZonesStage(const String& stageConfigDir, const
"daemon",
"--validate",
"--define",
"System.IgnoreZonesVarDir=true"
"System.ZonesStageVarDir='" + GetApiZonesStageDir() + "'" //Path is written onto the shell
});
Process::Ptr process = new Process(Process::PrepareCommand(args));