diff --git a/continuousintegration/orchestration/helm/frontend/values.yaml b/continuousintegration/orchestration/helm/frontend/values.yaml index df9a0beaadd5ec0f82eb2ff588997166acbf0131..e8088668be4b553050f9ea14e2c127216597f31a 100644 --- a/continuousintegration/orchestration/helm/frontend/values.yaml +++ b/continuousintegration/orchestration/helm/frontend/values.yaml @@ -12,7 +12,7 @@ conf: frontend: instanceName: "CI" archiveFileMaxSizeGb: 1000 - zeroLengthFilesForbidden: "on" + zeroLengthFilesForbidden: true zeroLengthFilesForbiddenVoExceptionList: "" logUrl: "file:/var/log/cta/cta-frontend.log" diff --git a/frontend/common/FrontendService.cpp b/frontend/common/FrontendService.cpp index a78a1932b60ef032e822840d038dad45814f2550..d390cc61ba813031694fb4a4a23180f480778a2e 100644 --- a/frontend/common/FrontendService.cpp +++ b/frontend/common/FrontendService.cpp @@ -250,19 +250,16 @@ FrontendService::FrontendService(const std::string& configFilename) : m_archiveF log(log::INFO, "Configuration entry", params); } - m_zeroLengthFilesForbidden = - config.getOptionValueStr("cta.archivefile.zero_length_files_forbidden").value_or("off") == "on" ? true : false; + std::optional<bool> zeroLengthFilesForbidden = config.getOptionValueBool("cta.archivefile.zero_length_files_forbidden"); + m_zeroLengthFilesForbidden = zeroLengthFilesForbidden.value_or(true); // disallow 0-length files by default { // Log cta.archivefile.zero_length_files_forbidden std::list<log::Param> params; - params.push_back(log::Param("source", - config.getOptionValueStr("cta.archivefile.zero_length_files_forbidden").has_value() ? - configFilename : - "Compile time default")); + params.push_back(log::Param("source", zeroLengthFilesForbidden.has_value() ? configFilename : "Compile time default")); params.push_back(log::Param("category", "cta.archivefile")); params.push_back(log::Param("key", "zero_length_files_forbidden")); params.push_back( - log::Param("value", config.getOptionValueStr("cta.archivefile.zero_length_files_forbidden").value_or("off"))); + log::Param("value", config.getOptionValueStr("cta.archivefile.zero_length_files_forbidden").value_or("true"))); log(log::INFO, "Configuration entry", params); }