Details
Description
Still broken on MaxScale 24.02.9 with MariaDB 12.2/12.3 — TRUE/FALSE not handled
We are hitting what looks like an incomplete fix for MXS-5915. MaxScale 24.02.9 still cannot monitor MariaDB 12.2/12.3 read replicas, while the same setup works when replicas are downgraded to 11.8.
Environment
- MaxScale: 24.02.9 (maxscale-24.02.9-1.rhel.9.x86_64)
- MaxScale host OS: AlmaLinux 9.8
- Write master (writedb): MariaDB 11.8
- Read replica (readdb): MariaDB 12.2 / 12.3 (Hetzner)
- Monitor module: mariadbmon
Steps to reproduce
- Run MaxScale 24.02.9 with mariadbmon monitoring a master (11.8) and a replica (12.2 or 12.3).
- Upgrade the replica from 11.8 to 12.x (or provision a new 12.x replica).
- Restart MaxScale.
- Observe monitor errors for the 12.x backend.
Actual behaviour
MaxScale log (/var/log/maxscale/maxscale.log):
[mariadbmon] Error during monitor update of server 'readdb': Query 'SELECT @@global.server_id, @@read_only, @@global.gtid_domain_id;' returned invalid data: Cannot convert field 'TRUE' to boolean.
|
Note: the error is TRUE, not ON as in the original report. MXS-5915 / 24.02.7 added ON/OFF handling, but MariaDB 12.2/12.3 appears to return native boolean values as TRUE/FALSE on the wire.
Downgrading the replica back to MariaDB 11.8 immediately restores correct monitoring.
On the 12.x replica:
SELECT @@version, @@read_only, @@global.read_only; |
-- returns TRUE (not 1 or ON) |
Expected behaviour
mariadbmon should accept TRUE/FALSE (in addition to 0/1, ON/OFF, Y/N) when parsing @@read_only, and classify the 12.x replica as a valid slave.
Impact
- Read replica is not recognised as a valid backend after 12.x upgrade.
- Monitor also logged primary-selection churn (e.g. 'readdb' is a better primary candidate than the current primary 'writedb', temporary promotion of the read replica when the master blipped). Secondary issue, but caused by the broken monitor state on the 12.x server.
Workaround
Keep replicas on MariaDB 11.8 until MaxScale handles TRUE/FALSE. Changing read_only=true vs read_only=on in my.cnf does not change the value returned by SELECT @@read_only on 12.x.
Suggested fix
Extend the boolean parser in queryresult.cc (same area as the MXS-5915 patch) to treat strcasecmp(data_elem, "TRUE") / "FALSE" the same as ON/OFF.
Happy to provide full logs, maxctrl list servers output, or SHOW GRANTS for the monitor user if useful.