21 Commits

Author SHA1 Message Date
Esa Korhonen
5528a8e8fb Merge branch '2.3' into develop 2019-06-19 17:27:57 +03:00
Esa Korhonen
39df829384 Don't kick out super-users when performing rejoin
When rejoining a server, preventing writes is not as essential as in switchover.
2019-06-19 17:14:39 +03:00
Esa Korhonen
d0e6921604 Improve switchover undo when new master fails
Now the monitor properly restores the old master by running promotion code on it.
Also, binlog is disabled when enabling server events.
2019-06-11 17:15:43 +03:00
Esa Korhonen
650230455a MXS-2169 Allow unsafe failover when 'enforce_simple_topology' is on
If gtid of master is unknown (as is typical when master is down when MaxScale
starts) the domain id is guessed from the slaves instead. This is usually
safe.
2019-05-20 10:43:54 +03:00
Esa Korhonen
476dc80bc9 Move settings shared between MariaDBMonitor and MariaDBServer to container
Removes the need to communicate these settings via call parameters.
2019-05-10 14:48:41 +03:00
Markus Mäkelä
418ccf861d
Format routers and monitors 2019-05-10 10:31:12 +03:00
Esa Korhonen
3c188bf421 Merge branch '2.3' into develop 2019-04-16 11:23:49 +03:00
Esa Korhonen
f8a22d0ac0 MXS-2344 Add setting for enabling SSL for replication
If the monitor setting "replication_master_ssl" is set to on, any CHANGE MASTER TO-command
will have MASTER_SSL=1. If set to off or unset, MASTER_SSL is left unchanged to match existing
behaviour.
2019-04-15 19:15:45 +03:00
Esa Korhonen
83fc3b1bc2 Merge branch '2.3' into develop 2019-03-04 17:43:53 +02:00
Esa Korhonen
4fd4b726a1 MXS-2325 Only enable events that were enabled on the master
The monitor now continuously updates a list of enabled server events. When
promoting a new master in failover/switchover, only events that were enabled
on the previous master are enabled on the new. This avoids enabling events
that may have been disabled on the master yet stayed in the SLAVESIDE_DISABLED-
state on the slave.

In the case of reset-replication command, events on the new master are only
enabled if the monitor had a master when the command was launched. Otherwise
all events remain disabled.
2019-03-04 16:00:07 +02:00
Esa Korhonen
b4d91d4b9a Move query result helper class to maxsql
Added some asserts to ensure the class is used correctly.
2019-01-14 10:43:17 +02:00
Esa Korhonen
6209d737e9 MXS-2220 server_alloc returns internal type
Also adds default initializers to SERVER fields.
2018-12-14 10:31:57 +02:00
Esa Korhonen
3e5818fcb6 MXS-2205 Convert mysql_utils.h to .hh 2018-12-03 14:05:21 +02:00
Esa Korhonen
184e187732 Different cluster operations use different parameter types
Only the parameters used by all operations are in the common class.
2018-11-07 12:55:59 +02:00
Esa Korhonen
a4ce4e4613 MariaDBServer no longer uses ClusterOperation
The functions in the server class now only use the general parameters object.
2018-11-07 12:55:59 +02:00
Esa Korhonen
8877e7180b Continue separation of ClusterOperation elements 2018-11-07 12:55:59 +02:00
Esa Korhonen
90e6ff078a Divide ClusterOperation to two types
The main class was getting unwieldly and too general. Dividing the fields
helps adding support for other operation types.

This commit leaves most data duplicated, later commits clean up the affected code.
2018-11-07 12:55:59 +02:00
Esa Korhonen
d0444ff054 SlaveStatus::to_short_string() uses member field
The owner server name is now stored in a field.
2018-10-10 17:26:48 +03:00
Esa Korhonen
2f1512a22d Cleanup slave connection removal during promotion/demotion
The removing and slave status updating is now separated to a function.
As the MariaDBServer object now contains the updated slave connections,
keeping track of removed connections is no longer required.
2018-10-09 14:29:49 +03:00
Esa Korhonen
c10fab977d Cleanup slave connection copy & merge
The two cases are now separated. In switchover, the promotion and
demotion targets can swap connections between each other without worry.
In failover, the two connection lists must be merged semi-intelligently.

The slave connections of the two servers are now saved to the operation
descriptor object at the start of the operation. This allows slave status
updating during the operation.
2018-10-09 14:29:49 +03:00
Esa Korhonen
68d65682b5 Reorganize MariaDBServer code
The server-class keeps growing, so the additional classes are moved out of
the main class file.
2018-10-09 14:29:49 +03:00