Remove servers from destroyed monitors
A destroyed monitor should not have any servers added to it. This allows the servers that once were monitored by a destroyed monitor to be added to new monitors.
This commit is contained in:
@ -586,6 +586,11 @@ bool runtime_destroy_monitor(MONITOR *monitor)
|
|||||||
if (rval)
|
if (rval)
|
||||||
{
|
{
|
||||||
monitorStop(monitor);
|
monitorStop(monitor);
|
||||||
|
|
||||||
|
while (monitor->databases)
|
||||||
|
{
|
||||||
|
monitorRemoveServer(monitor, monitor->databases->server);
|
||||||
|
}
|
||||||
MXS_NOTICE("Destroyed monitor '%s'. The monitor will be removed "
|
MXS_NOTICE("Destroyed monitor '%s'. The monitor will be removed "
|
||||||
"after the next restart of MaxScale.", monitor->name);
|
"after the next restart of MaxScale.", monitor->name);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user