From e73b561dcadf8222cf74128ac687d967f4f35c47 Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Fri, 26 Aug 2022 17:54:17 -0700 Subject: [PATCH] Update Management framework to new Supervisor::NodeConfig script fields --- scripts/policy/frameworks/management/agent/boot.zeek | 2 +- scripts/policy/frameworks/management/agent/main.zeek | 4 ++-- scripts/policy/frameworks/management/controller/boot.zeek | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/policy/frameworks/management/agent/boot.zeek b/scripts/policy/frameworks/management/agent/boot.zeek index 3f328bce7a..76ef951cea 100644 --- a/scripts/policy/frameworks/management/agent/boot.zeek +++ b/scripts/policy/frameworks/management/agent/boot.zeek @@ -25,7 +25,7 @@ event zeek_init() local epi = Management::Agent::endpoint_info(); local sn = Supervisor::NodeConfig($name=epi$id, $bare_mode=T, - $scripts=vector("policy/frameworks/management/agent/main.zeek")); + $addl_base_scripts=vector("policy/frameworks/management/agent/main.zeek")); # Establish the agent's working directory. If one is configured # explicitly, use as-is if absolute. Otherwise, append it to the state diff --git a/scripts/policy/frameworks/management/agent/main.zeek b/scripts/policy/frameworks/management/agent/main.zeek index 586a2be4fc..482a221a9d 100644 --- a/scripts/policy/frameworks/management/agent/main.zeek +++ b/scripts/policy/frameworks/management/agent/main.zeek @@ -556,14 +556,14 @@ function deploy_request_finish(areq: Management::Request::Request) if ( node?$cpu_affinity ) nc$cpu_affinity = node$cpu_affinity; if ( node?$scripts ) - nc$scripts = node$scripts; + nc$addl_user_scripts = node$scripts; if ( node?$env ) nc$env = node$env; # Always add the policy/management/node scripts to any cluster # node, since we require it to be able to communicate with the # node. - nc$scripts[|nc$scripts|] = "policy/frameworks/management/node"; + nc$addl_user_scripts += "policy/frameworks/management/node"; # We don't set nc$stdout_file/stderr_file here because the # Management framework's Supervisor shim manages those output diff --git a/scripts/policy/frameworks/management/controller/boot.zeek b/scripts/policy/frameworks/management/controller/boot.zeek index e117583e1e..25d84a0d2e 100644 --- a/scripts/policy/frameworks/management/controller/boot.zeek +++ b/scripts/policy/frameworks/management/controller/boot.zeek @@ -16,7 +16,7 @@ event zeek_init() local epi = Management::Controller::endpoint_info(); local sn = Supervisor::NodeConfig($name=epi$id, $bare_mode=T, - $scripts=vector("policy/frameworks/management/controller/main.zeek")); + $addl_base_scripts=vector("policy/frameworks/management/controller/main.zeek")); # Establish the controller's working directory. If one is configured # explicitly, use as-is if absolute. Otherwise, append it to the state