[MXS-2120] Maxscale doesn't detect master and do failover if master is down before maxscale restart. Created: 2018-10-29  Updated: 2019-09-04  Resolved: 2019-09-04

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbmon
Affects Version/s: 2.2.15
Fix Version/s: 2.4.0

Type: New Feature Priority: Major
Reporter: Nilnandan Joshi Assignee: Esa Korhonen
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MXS-2169 Split rejoin to two operations, add "... Closed
Sprint: MXS-SPRINT-70

 Description   

It seems Maxscale doesn't detect master and do failover if master is down before maxscale restart.

[nil@centos68 rsandbox_mariadb-10_2_14]$ maxadmin list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server             | Address         | Port  | Connections | Status              
-------------------+-----------------+-------+-------------+--------------------
master             | 127.0.0.1       | 24044 |           0 | Master, Running
slave1             | 127.0.0.1       | 24045 |           0 | Running
slave2             | 127.0.0.1       | 24046 |           0 | Running
-------------------+-----------------+-------+-------------+--------------------
[nil@centos68 rsandbox_mariadb-10_2_14]$ 
[nil@centos68 rsandbox_mariadb-10_2_14]$ sudo /etc/init.d/maxscale stop
Stopping MaxScale:                                         [  OK  ]
[nil@centos68 rsandbox_mariadb-10_2_14]$ master/stop
[nil@centos68 rsandbox_mariadb-10_2_14]$ 
[nil@centos68 rsandbox_mariadb-10_2_14]$ sudo /etc/init.d/maxscale start
Starting MaxScale: maxscale (pid 26334) is running...      [  OK  ]
[nil@centos68 rsandbox_mariadb-10_2_14]$ 
[nil@centos68 rsandbox_mariadb-10_2_14]$ maxadmin list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server             | Address         | Port  | Connections | Status              
-------------------+-----------------+-------+-------------+--------------------
master             | 127.0.0.1       | 24044 |           0 | Down
slave1             | 127.0.0.1       | 24045 |           0 | Running
slave2             | 127.0.0.1       | 24046 |           0 | Running
-------------------+-----------------+-------+-------------+--------------------
[nil@centos68 rsandbox_mariadb-10_2_14]$

So if master is down and we start maxscale, it should do the failover, select any of the slave and make it to master.



 Comments   
Comment by Esa Korhonen [ 2018-11-08 ]

This is by design. Can be changed, but requires more than a simple bug fix.

Comment by Esa Korhonen [ 2019-09-04 ]

Added in 2.4.0. Requires the "enforce_simple_topology"-setting.

Generated at Thu Feb 08 04:11:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.