Management framework: node restart support

This adds restart request/response event pairs that restart nodes in the running
Zeek cluster. The implementation is very similar to get_id_value, which also
involves distributing a list of nodes to agents and aggregating the responses.
This commit is contained in:
Christian Kreibich 2022-06-22 17:11:58 -07:00
parent bd39207772
commit b9879a50a0
4 changed files with 354 additions and 0 deletions

View file

@ -170,6 +170,36 @@ export {
global get_id_value_response: event(reqid: string, results: Management::ResultVec);
## The client sends this event to restart currently running Zeek cluster
## nodes. The controller relays the request to its agents, which respond
## with a list of :zeek:see:`Management::Result` records summarizing
## each node restart. The controller combines these lists, and sends a
## :zeek:see:`Management::Controller::API::restart_response` event with
## the result.
##
## reqid: a request identifier string, echoed in the response event.
##
## nodes: a set of cluster node names (e.g. "worker-01") to restart. An
## empty set, supplied by default, means restart of all current
## cluster nodes.
##
global restart_request: event(reqid: string, nodes: set[string] &default=set());
## Response to a :zeek:see:`Management::Controller::API::restart_request`
## event. The controller sends this back to the client when it has received
## responses from all agents involved, or a timeout occurs.
##
## reqid: the request identifier used in the request event.
##
## results: a :zeek:type:`vector` of :zeek:see:`Management::Result`,
## combining the restart results from all agents. Each such result
## identifies both the instance and node in question. Results that
## do not identify an instance are generated by the controller,
## flagging corner cases, including absence of a deployed cluster
## or unknown nodes.
##
global restart_response: event(reqid: string, results: Management::ResultVec);
# Testing events. These don't provide operational value but expose
# internal functionality, triggered by test cases.