[MXS-860] I want to access the web site if master server is down. Created: 2016-09-09  Updated: 2016-11-18  Resolved: 2016-09-13

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.0.0
Fix Version/s: 2.0.1

Type: Bug Priority: Critical
Reporter: sava Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

CentOS Linux release 7.2.1511
maxscale-2.0.0-1.x86_64 ( maxscale-beta-2.0.0-1.centos.7.x86_64.rpm )



 Description   

My /etc/maxscale.cnf is:

[Read-Write Service]
router_options=master_failure_mode=error_on_write

I have two servers:

server1 | 127.0.0.1 | 3311 | 0 | Slave, Running
server2 | 127.0.0.1 | 23307 | 0 | Master, Slave of External Server, Running

I can access the web site at this time.
Then I stopped the server2.

server1 | 127.0.0.1 | 3311 | 0 | Slave, Running
server2 | 127.0.0.1 | 23307 | 0 | Down

I can still access the web site because of having option error_on_write.
Then I restarted maxscale daemon.

server1 | 127.0.0.1 | 3311 | 0 | Running
server2 | 127.0.0.1 | 23307 | 0 | Down

I can't access the web site because of database error.
I want to access the web site if master server is down.



 Comments   
Comment by Johan Wikman [ 2016-09-09 ]

I think this is the same as https://jira.mariadb.org/browse/MXS-636

Please read Read Continuation upon Master Down in
https://github.com/mariadb-corporation/MaxScale/blob/2.0/Documentation/Release-Notes/MaxScale-2.0.0-Release-Notes.md

Does that fulfill your needs?

Comment by markus makela [ 2016-09-12 ]

The reason this happens is because MaxScale doesn't know that the slave was once a valid slave. The MySQL monitor in MaxScale only looks at the active replication state and if no master is found, it will not assign slave status to any server.

This could be considered a "bug" of sorts and I think that it could be changed so that if the stale slave detection feature is enabled and no master is found, all servers which have replication configured could be labeled as slaves. This would allow MaxScale to continue serving reads when the master goes down.

Comment by markus makela [ 2016-09-13 ]

The slaves are now properly detected even if maxscale goes down.

Comment by sava [ 2016-11-18 ]

I confirmed it has been fixed in maxscale-2.0.1-2.x86_64.

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