[MXS-4426] Ability to control server status based off "Slave of External Server" Created: 2022-12-02  Updated: 2023-06-30  Resolved: 2023-06-30

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbmon
Affects Version/s: 6.2.0
Fix Version/s: 6.2.4

Type: New Feature Priority: Major
Reporter: Bryan Bancroft (Inactive) Assignee: Todd Stoffel (Inactive)
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

AWS compute instance, slaved DR cluster



 Description   

I have 2 clusters
3 dbs behind 2 maxscale nodes behind a NLB

DR is slaved to the other cluster

The DR cluster is able to be used if a write is sent. I would request a flag to allow RO enforcement on the below setup. Based off "Slave of External Server".

This should be a variable in the service like "external_slave_read_only"

[bryan.bancroft@AUSW2RESIGNMS01 ~]$ maxctrl list servers
┌─────────────────┬──────────────┬──────┬─────────────┬───────────────────────────────────────────┬──────────────┐
│ Server │ Address │ Port │ Connections │ State │ GTID │
├─────────────────┼──────────────┼──────┼─────────────┼───────────────────────────────────────────┼──────────────┤
│ AUSW2RESIGNDB01 │ 10.135.20.39 │ 3306 │ 120 │ Master, Running, Slave of External Server │ 0-101-112016 │
├─────────────────┼──────────────┼──────┼─────────────┼───────────────────────────────────────────┼──────────────┤
│ AUSW2RESIGNDB02 │ 10.135.21.25 │ 3306 │ 120 │ Slave, Running │ 0-101-112016 │
├─────────────────┼──────────────┼──────┼─────────────┼───────────────────────────────────────────┼──────────────┤
│ AUSW2RESIGNDB03 │ 10.135.20.15 │ 3306 │ 120 │ Slave, Running │ 0-101-112016 │
└─────────────────┴──────────────┴──────┴─────────────┴───────────────────────────────────────────┴──────────────┘



 Comments   
Comment by markus makela [ 2022-12-05 ]

You should already be able to use SET GLOBAL read_only = ON on the Master node to control whether you can write there. Note that you'll require a suitable readwritesplit or readconnroute configuration that can work without a Master server.

Comment by markus makela [ 2022-12-07 ]

Please let us know how this differs from manually adjusting the read_only variable on the database server.

Comment by Bryan Bancroft (Inactive) [ 2022-12-07 ]

As with maxscale managing read only for a local cluster this would be nice to control automatically.

One oddity when using DR clusters is what seems bad status
if replication breaks on the DR master it will show "MASTER, RUNNING" without a clear tag for that issue

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