Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
24.02.1
-
None
-
OS: RedHat 9.2 (64b)
MaxScale: 24.02.1
MariaDB : 10.5 (topology: 1 master + 2 slaves)
Three nodes maxscale with MariaDB (10.5)
Description
When losing both maxscale node (with primary: true and lock_held: true) and the MariaDB instance (primary), no other node is elected as primary.
How to simulate:
On tree VMs install both MaxScale and MariaDB,
The VM with MariaDB as Primary the MaxScale held the lock
==> Disconnect the network on the VM that hold the MariaDB primary instance and MaxScale as primary=true
==> No automatic failover happend in this situation
==> When the connection comme back, the MaxScale detect the Primary Node but all the MaxScale instances are with primary=false
root@mariadc1 ~]# maxctrl list servers
┌──────────┬───────────────┬──────┬─────────────┬─────────────────┬─────────┬─────────────────┐
│ Server │ Address │ Port │ Connections │ State │ GTID │ Monitor │
├──────────┼───────────────┼──────┼─────────────┼─────────────────┼─────────┼─────────────────┤
│ mariadc1 │ 192.168.56.74 │ 3306 │ 0 │ Master, Running │ 1-1-428 │ MariaDB-Monitor │
├──────────┼───────────────┼──────┼─────────────┼─────────────────┼─────────┼─────────────────┤
│ mariadc2 │ 192.168.56.75 │ 3306 │ 0 │ Slave, Running │ 1-1-428 │ MariaDB-Monitor │
├──────────┼───────────────┼──────┼─────────────┼─────────────────┼─────────┼─────────────────┤
│ mariadc3 │ 192.168.56.76 │ 3306 │ 0 │ Slave, Running │ 1-1-428 │ MariaDB-Monitor │
└──────────┴───────────────┴──────┴─────────────┴─────────────────┴─────────┴─────────────────┘
[root@mariadc1 ~]# maxctrl show monitor MariaDB-Monitor | grep -e 'Diagnostics' -e '"primary"' -e 'lock_held' | uniq
│ Monitor Diagnostics │ { │
│ │ "primary": true, │
│ │ "lock_held": true, │
If disconnect the network on mariadc1, no primary is elected
[root@mariadc2 ~]# maxctrl show monitor MariaDB-Monitor | grep -e 'Diagnostics' -e '"primary"' -e 'lock_held' | uniq
│ Monitor Diagnostics │ { │
│ │ "primary": false, │
│ │ "lock_held": null, │
│ │ "lock_held": false,
[root@mariadc3 ~]# maxctrl show monitor MariaDB-Monitor | grep -e 'Diagnostics' -e '"primary"' -e 'lock_held' | uniq
│ Monitor Diagnostics │ { │
│ │ "primary": false, │
│ │ "lock_held": null, │
│ │ "lock_held": false,
root@mariadc2 ~]# maxctrl list servers
┌──────────┬───────────────┬──────┬─────────────┬────────────────┬─────────┬─────────────────┐
│ Server │ Address │ Port │ Connections │ State │ GTID │ Monitor │
├──────────┼───────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
│ mariadc1 │ 192.168.56.74 │ 3306 │ 0 │ Down │ 1-1-451 │ MariaDB-Monitor │
├──────────┼───────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
│ mariadc2 │ 192.168.56.75 │ 3306 │ 0 │ Slave, Running │ 1-1-451 │ MariaDB-Monitor │
├──────────┼───────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
│ mariadc3 │ 192.168.56.76 │ 3306 │ 0 │ Slave, Running │ 1-1-451 │ MariaDB-Monitor │
└──────────┴───────────────┴──────┴─────────────┴────────────────┴─────────┴─────────────────┘
[root@mariadc3 ~]# maxctrl list servers
┌──────────┬───────────────┬──────┬─────────────┬────────────────┬─────────┬─────────────────┐
│ Server │ Address │ Port │ Connections │ State │ GTID │ Monitor │
├──────────┼───────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
│ mariadc1 │ 192.168.56.74 │ 3306 │ 0 │ Down │ 1-1-451 │ MariaDB-Monitor │
├──────────┼───────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
│ mariadc2 │ 192.168.56.75 │ 3306 │ 0 │ Slave, Running │ 1-1-451 │ MariaDB-Monitor │
├──────────┼───────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
│ mariadc3 │ 192.168.56.76 │ 3306 │ 0 │ Slave, Running │ 1-1-451 │ MariaDB-Monitor │
└──────────┴───────────────┴──────┴─────────────┴────────────────┴─────────┴─────────────────┘