Persist changes to the list of monitored servers
When a server is added to a monitor, an supplementary configuration file is generated to persist this information. This will allow dynamic modifications to server lists which will survive restarts and unexpected downtime. The monitor will only add new servers to its list of monitored servers. This prevents duplicate entries in the list and makes it safe to persist all used servers to the supplementary configuration file instead of only the ones that are not listed in the main configuration.
This commit is contained in:
@ -753,6 +753,7 @@ static void cmd_AddServer(DCB *dcb, void *a, void *b)
|
||||
else if (monitor)
|
||||
{
|
||||
monitorAddServer(monitor, server);
|
||||
monitor_serialize_servers(monitor);
|
||||
}
|
||||
|
||||
const char *target = service ? "service" : "monitor";
|
||||
@ -809,6 +810,7 @@ static void cmd_RemoveServer(DCB *dcb, void *a, void *b)
|
||||
else if (monitor)
|
||||
{
|
||||
monitorRemoveServer(monitor, server);
|
||||
monitor_serialize_servers(monitor);
|
||||
}
|
||||
|
||||
const char *target = service ? "service" : "monitor";
|
||||
|
Reference in New Issue
Block a user