mirror of
https://github.com/openappsec/openappsec.git
synced 2025-06-28 16:41:02 +03:00
Fix manifest handling
This commit is contained in:
parent
c89001b6e0
commit
01b6544ca5
@ -160,16 +160,21 @@ ManifestController::Impl::updateManifest(const string &new_manifest_file)
|
||||
{
|
||||
auto i_env = Singleton::Consume<I_Environment>::by<ManifestController>();
|
||||
auto span_scope = i_env->startNewSpanScope(Span::ContextType::CHILD_OF);
|
||||
auto orchestration_tools = Singleton::Consume<I_OrchestrationTools>::by<ManifestController>();
|
||||
|
||||
if (isIgnoreFile(new_manifest_file)) return true;
|
||||
if (isIgnoreFile(new_manifest_file)) {
|
||||
if (!orchestration_tools->copyFile(new_manifest_file, manifest_file_path)) {
|
||||
dbgWarning(D_ORCHESTRATOR) << "Failed to copy a new manifest file";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
dbgDebug(D_ORCHESTRATOR) << "Starting to update manifest file";
|
||||
auto ignored_settings_packages = getProfileAgentSetting<IgnoredPackages>("orchestration.IgnoredPackagesList");
|
||||
set<string> packages_to_ignore = ignore_packages;
|
||||
if (ignored_settings_packages.ok()) packages_to_ignore = *(*ignored_settings_packages);
|
||||
|
||||
auto orchestration_tools = Singleton::Consume<I_OrchestrationTools>::by<ManifestController>();
|
||||
|
||||
if (packages_to_ignore.count("all") > 0) {
|
||||
dbgTrace(D_ORCHESTRATOR) << "Nothing to update (\"ignore all\" turned on)";
|
||||
|
||||
|
@ -1087,7 +1087,8 @@ private:
|
||||
vector<string> data_updates;
|
||||
update_results[OrchestrationStatusConfigType::DATA] = handleDataUpdate(orch_data, data_updates);
|
||||
|
||||
if (!orch_manifest.ok() && orch_policy.ok()) {
|
||||
auto orch_mode = agent_details->getOrchestrationMode();
|
||||
if ((!orch_manifest.ok() || orch_mode == OrchestrationMode::HYBRID) && orch_policy.ok()) {
|
||||
update_results[OrchestrationStatusConfigType::POLICY] = handlePolicyUpdate(
|
||||
orch_policy,
|
||||
settings_path,
|
||||
|
Loading…
x
Reference in New Issue
Block a user