[MXS-400] readwritesplit router doesn't allow connect when the only remaining server is master and slave Created: 2015-10-07  Updated: 2016-02-11  Resolved: 2016-02-11

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: None
Fix Version/s: 1.4.0

Type: Bug Priority: Minor
Reporter: Joffrey MICHAIE (Inactive) Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

Hi, using MXS 1.2.1 on Centos 6 64 bits.

I have set-up a simple Master/Slave replication with 3 routers on Maxscale:
1) Master Route
2) Slave Route
3) RW Split

My replication breaks, and I restart maxscale, it doesn't allow anymore connections.

To fix it, I disable the monitor, and set manually the flags on the "healthy" server.

If I give only the "master" flag, all 3 routers works well.
If I also give the "slave" flag, then the readwritesplit doesn't connect anymore.

I think this is a bug, but I leave the last word to you.

Cheers,
Joffrey

Scenario 1 (manually setting the server to "master" only

MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server             | Address         | Port  | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
vm-xxx-xxx-db-1    | 10.0.51.81      |  3306 |           0 | Running
vm-xxx-xxx-db-2    | 10.0.51.82      |  3306 |           0 | Running
-------------------+-----------------+-------+-------------+--------------------
 
MaxScale> shutdown monitor "MySQL Monitor"
MaxScale> set server vm-xxx-xxx-db-1 master
MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server             | Address         | Port  | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
vm-xxx-xxx-db-1    | 10.0.51.81      |  3306 |           0 | Master, Running
vm-xxx-xxx-db-2    | 10.0.51.82      |  3306 |           0 | Running
-------------------+-----------------+-------+-------------+--------------------
 
Test connectivity (all OK):
 
# mysql -BN -h10.0.51.83 -udba_user  -P33306 -e "select @@hostname,'mastercon'"
vm-xxx-xxx-db-1 mastercon
 
# mysql -BN -h10.0.51.83 -udba_user  -P33307 -e "select @@hostname,'slavecon'"
vm-xxx-xxx-db-1 slavecon
 
# mysql -BN -h10.0.51.83 -udba_user  -P33308 -e "select @@hostname,'rwsplit'"
vm-xxx-xxx-db-1 rwsplit
 

Scenario 2 (manually setting the server to "master" only

 
MaxScale> set server vm-xxx-xxx-db-1 slave
MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server             | Address         | Port  | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
vm-xxx-xxx-db-1    | 10.0.51.81      |  3306 |           0 | Master, Slave, Running
vm-xxx-xxx-db-2    | 10.0.51.82      |  3306 |           0 | Running
-------------------+-----------------+-------+-------------+--------------------
 
Test connectivity (NOT ALL OK):
 
# mysql -BN -h10.0.51.83 -udba_user  -P33306 -e "select @@hostname,'mastercon'"
vm-xxx-xxx-db-1 mastercon
 
# mysql -BN -h10.0.51.83 -udba_user  -P33307 -e "select @@hostname,'slavecon'"
vm-xxx-xxx-db-1 slavecon
 
# mysql -BN -h10.0.51.83 -udba_user  -P33308 -e "select @@hostname,'rwsplit'"
(timeout ...)
 
 
 
Nothing in the logs....
 



 Comments   
Comment by markus makela [ 2016-02-04 ]

The master and slave status checks prevented a master from being a slave even though it is a possible scenario.

Comment by markus makela [ 2016-02-11 ]

The servers are now properly chosen and it is possible for a server to be a master and a slave.

Generated at Thu Feb 08 03:59:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.