MXS-2314 Monitor decides whether servers are added to services
When the servers of a service are defined by a monitor, then at startup all servers of the monitor should be added to relevant services. Likewise, when a server is added to or removed from a monitor at runtime, those changes should affect services as well. However, whether that should happen or not depends upon the monitor. In the case of the Clustrix monitor this should not happen as it adds and removes servers depending on the runtime state of the Clustrix cluster.
This commit is contained in:
@ -119,6 +119,18 @@ bool ClustrixMonitor::unsoftfail(SERVER* pServer, json_t** ppError)
|
||||
return true;
|
||||
}
|
||||
|
||||
void ClustrixMonitor::server_added(SERVER* pServer)
|
||||
{
|
||||
// The servers explicitly added to the Cluster monitor are only used
|
||||
// as bootstrap servers, so they are not added to any services.
|
||||
}
|
||||
|
||||
void ClustrixMonitor::server_removed(SERVER* pServer)
|
||||
{
|
||||
// @see server_added(), no action is needed.
|
||||
}
|
||||
|
||||
|
||||
void ClustrixMonitor::pre_loop()
|
||||
{
|
||||
make_health_check();
|
||||
|
Reference in New Issue
Block a user