Add ClusterController::API::notify_agents_ready event

This changes the basic agent-management model to one in which the configurations
received from the client define not just the data cluster, but also set the set
of acceptable instances. Unless connectivity already exists, the controller will
establish peerings with new agents that listen, or wait for ones that connect to
the controller to check in.

Once all required agents are available, the controller triggers the new
notify_agents_ready event, an agent/controller-level "cluster-is-ready"
event. The controller also uses this event to submit a pending config update to
the now-ready instances.
This commit is contained in:
Christian Kreibich 2021-11-29 11:41:49 -08:00
parent b57be021b7
commit 09d9be3433
5 changed files with 221 additions and 171 deletions

View file

@ -5,6 +5,10 @@ module ClusterController::API;
export {
const version = 1;
# Triggered when the operational instances align with desired ones, as
# defined by the latest cluster config sent by the client.
global notify_agents_ready: event(instances: set[string]);
global get_instances_request: event(reqid: string);
global get_instances_response: event(reqid: string,
instances: vector of ClusterController::Types::Instance);