From bd6c1683a2fe0677de43e4ae87f42912b9e969b7 Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Thu, 12 May 2022 13:07:03 -0700 Subject: [PATCH] Management framework: comment and layouting tweaks, no functional change Also remove additional instances of the term "data cluster". --- scripts/policy/frameworks/management/agent/config.zeek | 4 ++-- scripts/policy/frameworks/management/agent/main.zeek | 8 +++++++- .../policy/frameworks/management/controller/config.zeek | 2 +- scripts/policy/frameworks/management/controller/main.zeek | 5 ++--- scripts/policy/frameworks/management/types.zeek | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/scripts/policy/frameworks/management/agent/config.zeek b/scripts/policy/frameworks/management/agent/config.zeek index 1a94fc8df1..51a36343b9 100644 --- a/scripts/policy/frameworks/management/agent/config.zeek +++ b/scripts/policy/frameworks/management/agent/config.zeek @@ -55,12 +55,12 @@ export { $address="0.0.0.0", $bound_port=0/unknown] &redef; ## An optional custom output directory for stdout/stderr. Agent and - ## controller currently only log locally, not via the data cluster's + ## controller currently only log locally, not via the Zeek cluster's ## logger node. This means that if both write to the same log file, ## output gets garbled. const directory = "" &redef; - ## The working directory for data cluster nodes created by this + ## The working directory for Zeek cluster nodes created by this ## agent. If you make this a relative path, note that the path is ## relative to the agent's working directory, since it creates data ## cluster nodes. diff --git a/scripts/policy/frameworks/management/agent/main.zeek b/scripts/policy/frameworks/management/agent/main.zeek index 2a5b0cab7b..a767c757fa 100644 --- a/scripts/policy/frameworks/management/agent/main.zeek +++ b/scripts/policy/frameworks/management/agent/main.zeek @@ -172,7 +172,13 @@ event Management::Agent::API::set_configuration_request(reqid: string, config: M g_cluster[node$name] = cep; } - # Apply the new configuration via the supervisor + # Apply the new configuration via the supervisor. + # + # XXX this should launch in the nodes in controlled order (loggers -> + # manager -> proxies -> workers), ideally checking that one stage is up + # before launching the next. This is tricky because that's not the point + # of the Supervisor's response event. Until we have this, bootstrap + # might be noisy, particular in the Broker log. for ( nodename in g_nodes ) { diff --git a/scripts/policy/frameworks/management/controller/config.zeek b/scripts/policy/frameworks/management/controller/config.zeek index 83c067e76c..f8ac86f0ec 100644 --- a/scripts/policy/frameworks/management/controller/config.zeek +++ b/scripts/policy/frameworks/management/controller/config.zeek @@ -44,7 +44,7 @@ export { const topic = "zeek/management/controller" &redef; ## An optional custom output directory for stdout/stderr. Agent and - ## controller currently only log locally, not via the data cluster's + ## controller currently only log locally, not via the Zeek cluster's ## logger node. This means that if both write to the same log file, ## output gets garbled. const directory = "" &redef; diff --git a/scripts/policy/frameworks/management/controller/main.zeek b/scripts/policy/frameworks/management/controller/main.zeek index 728ca36518..b2f5c44711 100644 --- a/scripts/policy/frameworks/management/controller/main.zeek +++ b/scripts/policy/frameworks/management/controller/main.zeek @@ -81,11 +81,10 @@ global null_config: function(): Management::Configuration; global is_null_config: function(config: Management::Configuration): bool; # Checks whether the given instance is one that we know with different -# communication settings: a a different peering direction, a different listening +# communication settings: a different peering direction, a different listening # port, etc. Used as a predicate to indicate when we need to drop the existing # one from our internal state. -global is_instance_connectivity_change: function - (inst: Management::Instance): bool; +global is_instance_connectivity_change: function(inst: Management::Instance): bool; # The set of agents the controller interacts with to manage to currently # configured cluster. This may be a subset of all the agents known to the diff --git a/scripts/policy/frameworks/management/types.zeek b/scripts/policy/frameworks/management/types.zeek index 6d89fbda1a..db3ac8da55 100644 --- a/scripts/policy/frameworks/management/types.zeek +++ b/scripts/policy/frameworks/management/types.zeek @@ -81,7 +81,7 @@ export { state: State; ## Role the node plays in cluster management. mgmt_role: Role &default=NONE; - ## Role the node plays in the data cluster. + ## Role the node plays in the Zeek cluster. cluster_role: Supervisor::ClusterRole &default=Supervisor::NONE; ## Process ID of the node. This is optional because the Supervisor may not have ## a PID when a node is still bootstrapping.