Support for dropping instances no longer needed after config updates

This sends such expired instances empty configurations that will cause them to
shut down their remaining data cluster nodes.
This commit is contained in:
Christian Kreibich 2021-11-09 23:55:10 -08:00
parent 8eee5bb3d2
commit ddbd83fee4
2 changed files with 70 additions and 23 deletions

View file

@ -149,12 +149,16 @@ event ClusterAgent::API::set_configuration_request(reqid: string, config: Cluste
# events asynchonously. The only indication of error will be
# notification events to the controller.
local res = ClusterController::Types::Result(
$reqid = reqid,
$instance = ClusterAgent::name);
if ( reqid != "" )
{
local res = ClusterController::Types::Result(
$reqid = reqid,
$instance = ClusterAgent::name);
ClusterController::Log::info(fmt("tx ClusterAgent::API::set_configuration_response %s", reqid));
event ClusterAgent::API::set_configuration_response(reqid, res);
ClusterController::Log::info(fmt("tx ClusterAgent::API::set_configuration_response %s",
ClusterController::Types::result_to_string(res)));
event ClusterAgent::API::set_configuration_response(reqid, res);
}
}
event Broker::peer_added(peer: Broker::EndpointInfo, msg: string)