mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Management framework: re-trigger deployment upon controller launch
A resilience feature: when a booting controller has a previously deployed configuration (just reloaded from persistent state), it now triggers a deployment. When agents at this point run something else, this restores the controller's understanding of what's deployed, and if the agents do still run this configuration, does nothing since agents ignore deployment of a configuration they already run.
This commit is contained in:
parent
c4862e7c5e
commit
1faf1ab8b7
1 changed files with 11 additions and 0 deletions
|
@ -1344,4 +1344,15 @@ event zeek_init()
|
|||
Broker::subscribe(Management::Controller::topic);
|
||||
|
||||
Management::Log::info(fmt("controller is live, Broker ID %s", Broker::node_id()));
|
||||
|
||||
# If we have a persisted deployed configuration, we need to make sure
|
||||
# it's actually running. The agents involved might be gone, running a
|
||||
# different config, etc. We simply run a deployment: agents already
|
||||
# running this configuration will do nothing.
|
||||
if ( DEPLOYED in g_configs )
|
||||
{
|
||||
local req = Management::Request::create();
|
||||
req$deploy_state = DeployState($config=g_configs[DEPLOYED], $is_internal=T);
|
||||
deploy(req);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue