Persist server changes to services

When a service is added or removed from a service, a supplementary
configuration file is created. This allows MaxScale to survive restars and
unexpected downtime even if runtime changes to the servers of a service
have been made.

With these changes, it is possible to start MaxScale without any servers,
create servers, add the created servers to services and monitors and
restart Maxscale without losing the runtime configuration changes.
This commit is contained in:
Markus Makela
2016-11-12 22:49:27 +02:00
parent a17aa28eed
commit 878d01e276
3 changed files with 136 additions and 32 deletions

View File

@ -749,6 +749,7 @@ static void cmd_AddServer(DCB *dcb, void *a, void *b)
if (service)
{
serviceAddBackend(service, server);
service_serialize_servers(service);
}
else if (monitor)
{
@ -806,6 +807,7 @@ static void cmd_RemoveServer(DCB *dcb, void *a, void *b)
if (service)
{
serviceRemoveBackend(service, server);
service_serialize_servers(service);
}
else if (monitor)
{