Esa Korhonen
4a6fc6b1c8
MXS-1703 Rearrange functions and methods
...
Lots of cleanup, but mostly distributing functions/methods to correct files.
2018-03-16 18:35:17 +02:00
Esa Korhonen
6afd57122d
Merge branch '2.2' into develop
2018-03-16 12:39:55 +02:00
Esa Korhonen
2178667245
MXS-1679 Check for existence of master before continuing failover checks
...
Seems to fix the issue with MaxScale detecting an old master down event.
2018-03-16 11:26:58 +02:00
Esa Korhonen
d32db326e4
MXS-1703 Manual switchover, failover, rejoin to class methods
...
This allows privatising several public methods. Also, cleaned up
monitor start and stop a bit.
2018-03-15 13:45:14 +02:00
Esa Korhonen
51188123c8
MXS-1703 Move cluster dicovery code to a separate file
...
Attempting to break the large main file to smaller chuncks.
2018-03-14 17:52:15 +02:00
Esa Korhonen
693854bd15
MXS-1703 Move most fields/methods to private
2018-03-14 15:08:53 +02:00
Esa Korhonen
5aeac621f9
MXS-1703 Most functions now moved to class methods
...
Cluster discovery functions still remain.
2018-03-14 15:08:53 +02:00
Esa Korhonen
fb55ea6015
MXS-1703 Move monitor main loop + other entrypoint contents to class methods
2018-03-14 15:08:53 +02:00
Esa Korhonen
ec1a4de480
MXS-1703 Some miscellaneous functions moved to class
2018-03-13 16:09:14 +02:00
Esa Korhonen
dad6a4f9bf
Merge branch '2.2' into develop
2018-03-13 11:26:41 +02:00
Esa Korhonen
b982458497
MXS-1679 Add more accurate error printing
...
The reason for rejoin failing should now be clearer.
2018-03-12 17:16:54 +02:00
Markus Mäkelä
5a62adc63e
MXS-1678: Detect broken replication with Last_IO_Errno
...
This commit introduces changes that fix the relay master detection that
was broken by the merge from 2.1 into 2.2 by commit
1ecd791887994209eb29e56e1271f8c407cd0cdf.
In 2.2, the master server ID is used to detect whether a slave is actually
replicating from a master. The value is still displayed even if the slave
is not actively replicating from a master. The commit in 2.1 causes this
value to be stored unconditionally if it is available. By checking the
value of Last_IO_Errno and comparing it to a list of known error codes, we
know whether the slave is replicating properly.
The slave detection in 2.2 correctly identifies a broken slave with a
stopped IO thread. Due to this, the test case must be modified to check
that the relay master is not a slave if the IO thread is stopped.
2018-03-12 14:55:54 +02:00
Johan Wikman
69383c0943
Merge branch '2.2' into develop
2018-03-12 14:38:37 +02:00
Esa Korhonen
6a8effaea1
MXS-1703: Move more functions to class methods
2018-03-12 10:58:11 +02:00
Johan Wikman
885d0af50f
Merge branch '2.2' into develop
2018-03-09 21:00:16 +02:00
Markus Mäkelä
f7b284bbb7
Check IO thread status when verifying master failure
...
When MaxScale thinks that the master has failed, it tries to verify it by
seeing if the slave server is receiving events. There was a missing IO
thread status check in the slave_receiving_events function which caused
the failover to wait until the verification timed out.
The relay master detection logic also lacked a check for the slave SQL
thread status. The code should check the state of the SQL thread to
determine whether the server is actually a functional slave to a master.
2018-03-09 20:53:56 +02:00
Johan Wikman
d443e22d1b
Merge branch '2.2.3' into 2.2
2018-03-09 20:50:01 +02:00
Markus Mäkelä
f4c7a4700a
Disable fix to MXS-1678 in 2.2.3
...
The fix causes a regression in the failover functionality as there is a
dependency between the slave's master ID and how the failover
performs. This dependency should not exist but fixing it causes a problem
with the mysqlmon_rejoin_bad2 test.
2018-03-08 21:03:52 +02:00
Esa Korhonen
b18207282d
MXS-1703: Remove unused functions & old comments
...
Made obsolete with previous refactoring.
2018-03-07 14:18:09 +02:00
Esa Korhonen
728817b001
MXS-1703: Move fail/switch/rejoin functions to class
...
Most of the related functions are now class methods in a dedicated file.
2018-03-07 13:26:31 +02:00
Esa Korhonen
87911dc6b0
MXS-1703: refactor startup & shutdown
...
Startup now done in a static method. Constructor initializes some values.
Config parameters loaded in a separate method. Some things still need
looking.
2018-03-07 13:26:24 +02:00
Esa Korhonen
7a505d9976
MXS-1703: Move replication manipulation functions to a separate file
...
Refactoring continues. This update moves some of the replication manipulation
functions to a separate file and turns them into class methods.
2018-03-07 13:26:14 +02:00
Esa Korhonen
173f44b351
MXS-1703: Move additional classes to separate file
...
Also use stl containers in monitor definition.
2018-03-07 13:26:02 +02:00
Esa Korhonen
8ef1385d1a
MXS-1703: Turn MariaDB Monitor struct to class with public fields
...
Allows using std::string for strings. Also, cleanup.
2018-03-07 13:25:52 +02:00
Esa Korhonen
1de8f5ffdc
MXS-1703: Compile mariadbmon.h as C++
2018-03-07 13:25:29 +02:00
Esa Korhonen
35232d8ad8
MXS-1703: Use dedicated header in NDBClusterMon
...
NDBClusterMonitor used the MariaDBMonitor header instead of its own.
2018-03-07 13:24:45 +02:00
Markus Mäkelä
ff9024bdfb
MXS-1698: Remove false debug assertion
...
It is not an error if the correct GTID is not found and thus it should not
be asserted that one is found.
2018-03-07 11:55:46 +02:00
Johan Wikman
39d3c42c94
Merge branch '2.1' into 2.2
2018-03-01 17:52:42 +02:00
Johan Wikman
b67ab83486
Revert "Use dedicated header in NDBClusterMon"
...
This reverts commit b9d80f6061d6b536d7a15febf0367e5f6dba0e84.
2018-02-24 15:43:15 +02:00
Johan Wikman
0bbf0246f9
Revert "Compile mariadbmon.h as C++"
...
This reverts commit 60d57aee61d96832aeec1b8a61d36803c38ca77c.
2018-02-24 15:40:21 +02:00
Johan Wikman
236e906d88
Revert "Turn MariaDB Monitor struct to class with public fields"
...
This reverts commit cb6f70119d9857b277306e9af5881fe29c574a32.
2018-02-24 15:37:50 +02:00
Johan Wikman
13661ab4a6
Revert "MariaDB Monitor: Move additional classes to separate file"
...
This reverts commit ff55106610881d55db88eca9e2ef6a056cbc8d51.
2018-02-24 15:35:36 +02:00
Johan Wikman
e721733434
Revert "MariaDBMon: Move replication manipulation functions to a separate file"
...
This reverts commit 8cdd23dda2add6486abb685834def94c72a09b6c.
2018-02-24 15:35:02 +02:00
Esa Korhonen
8cdd23dda2
MariaDBMon: Move replication manipulation functions to a separate file
...
Refactoring continues. This update moves some of the replication manipulation
functions to a separate file and turns them into class methods.
2018-02-22 10:51:52 +02:00
Esa Korhonen
ff55106610
MariaDB Monitor: Move additional classes to separate file
...
Also use stl containers in monitor definition.
2018-02-21 12:24:24 +02:00
Esa Korhonen
cb6f70119d
Turn MariaDB Monitor struct to class with public fields
...
Allows using std::string for strings. Also, cleanup.
2018-02-21 11:00:42 +02:00
Esa Korhonen
60d57aee61
Compile mariadbmon.h as C++
2018-02-20 11:14:21 +02:00
Esa Korhonen
b9d80f6061
Use dedicated header in NDBClusterMon
...
NDBClusterMonitor used the MariaDBMonitor header instead of its own.
2018-02-20 11:09:04 +02:00
Esa Korhonen
754d80da75
Do not auto_rejoin if maxscale is passive
2018-02-14 17:30:02 +02:00
Markus Mäkelä
3b2ec4ab5a
Change references from MySQL to MariaDB
...
A few were missed when the renaming was done. Also renamed the file to
mariadbmon.cc.
2018-02-14 14:47:03 +02:00