12 Commits

Author SHA1 Message Date
Esa Korhonen
e455e8d43c Simplify monitor start and stop during switchover/failover
If these operations failed, the monitor could be left stopped.
2018-01-29 15:44:32 +02:00
Esa Korhonen
9ded584836 Check that all slaves use gtid replication before performing failover 2018-01-29 13:33:16 +02:00
Esa Korhonen
257034bf3e Clarify master failure verification
The two previous functions were somewhat overlapping.
2018-01-23 16:14:50 +02:00
Markus Mäkelä
753b97303a MXS-1606: Create maxscale_schema database if missing
The monitor will now also create the database if it is missing. Since it
already creates the table, also creating the database is not a large
addition.

Cleaned up some of the related checking code and combined them into a
simple utility function.
2018-01-19 11:34:25 +02:00
Esa Korhonen
a4f6176ced Fix bug in printing switchover/failover module command info
The string constant passed to the register-function went invalid
once CREATE_MODULE() completed, causing random characters to be
printed.
2018-01-17 12:01:00 +02:00
Esa Korhonen
23f2c3b980 Better failover timing and redirection success is tested
Works similar to switchover.
2018-01-16 18:05:12 +02:00
Esa Korhonen
c2c898ee93 Fix formatting in MariaDB Monitor 2018-01-16 13:27:20 +02:00
Esa Korhonen
ff2ad05d0a Add manual rejoin command to MariaDB Monitor
The rejoin command takes as parameters the monitor name and
name of server to rejoin.

This change required refactoring the rejoin code.
2018-01-16 13:20:35 +02:00
Esa Korhonen
5f4db64ac7 Better timing for switchover, check slaves for IO/SQL errors
Time elapsed is now properly tracked during a switchover. After slave
redirection, an event is added to the master. Then, the slaves are queried
repeatedly until they advance to the newest event. I/O and SQL errors are
also detected.
2018-01-08 15:23:25 +02:00
Esa Korhonen
047c08f577 MXS-1588: Wait on all slaves during switchover
During switchover, MASTER_GTID_WAIT is now called on all slaves. This causes
switchover to complete slower than before but is safer if log_slave_updates
is not on on the new master server. Also, read_only is disabled on the
demoted server if waiting on slaves or promotion fails. This should
effectively cancel the failover for the old master.
2018-01-03 12:52:33 +02:00
Johan Wikman
9558addbfe Update module name for mariadbmon 2018-01-02 11:01:28 +02:00
Johan Wikman
d4f9cb661f MXS-1587 Rename mysqlmon to mariadbmon
'mysqlmon' is still accepted but 'mariadbmon' is loaded instead.
This is done at runtime instead of e.g. by using a symbolic link,
so that a warning can be logged.

The warning is logged and the translation of the module name is
made by the code that loads the modules so that it's easy to do
the same thing for other modules as well.

In a subsequent commit the documentation is updated.
2017-12-27 11:22:27 +02:00