Refactor pre-switchover, add similar checks as in failover

Now detects some erroneous situations before starting switchover.
Switchover can be activated without specifying current master.
In this case, the cluster master server is selected.
This commit is contained in:
Esa Korhonen
2018-01-26 09:58:10 +02:00
parent ea58b16a7a
commit 255250652d
3 changed files with 171 additions and 192 deletions

View File

@ -375,4 +375,13 @@ void store_server_journal(MXS_MONITOR *monitor, MXS_MONITORED_SERVER *master);
*/
void load_server_journal(MXS_MONITOR *monitor, MXS_MONITORED_SERVER **master);
/**
* Find the monitored server representing the server.
*
* @param mon Cluster monitor
* @param search_server Server to search for
* @return Found monitored server or NULL if not found
*/
MXS_MONITORED_SERVER* mon_get_monitored_server(MXS_MONITOR* mon, SERVER* search_server);
MXS_END_DECLS