Update Management framework to new Supervisor::NodeConfig script fields

This commit is contained in:
Christian Kreibich 2022-08-26 17:54:17 -07:00
parent 412c150c63
commit e73b561dca
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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