MXS-1446: Add execution of dummy failover command

The failover command is simulated by executing a call to /usr/bin/echo
with all possible monitor parameters. This allows testing of the failover
mechanism without actually using the failover command.
This commit is contained in:
Markus Mäkelä
2017-09-27 10:50:25 +03:00
parent 316f792242
commit 4c3d6f6884
6 changed files with 88 additions and 23 deletions

View File

@ -531,6 +531,16 @@ bool runtime_alter_monitor(MXS_MONITOR *monitor, const char *key, const char *va
monitorSetFailoverTimeout(monitor, ival);
}
}
else if (strcmp(key, CN_FAILOVER) == 0)
{
int val = config_truth_value(value);
if (val != -1)
{
valid = true;
monitorSetFailover(monitor, val);
}
}
else
{
/** We're modifying module specific parameters and we need to stop the monitor */