resource-agents icon indicating copy to clipboard operation
resource-agents copied to clipboard

MariaDB promotable force a node to be master

Open guidtz opened this issue 5 years ago • 0 comments

Hello, I have a problem when I try to make promotable resource for mariadb master / slave. I do like that :

pcs resource create MARIADB ocf:heartbeat:mariadb binary="/usr/sbin/mysqld" replication_user="replicator" replication_passwd="*******" node_list="node01 node02" op start timeout=120 interval=0 op stop timeout=120 interval=0 op promote timeout=120 interval=0 op demote timeout=120 interval=0 op monitor role=Master timeout=30 interval=10 op monitor role=Slave timeout=30 interval=20 op notify timeout="60s" interval="0s"

And pcs resource promotable MARIADB master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true

But It set node02 as the master and fails : Clone Set: MARIADB-clone [MARIADB] (promotable) MARIADB (ocf::heartbeat:mariadb): FAILED node01 (Monitoring) Masters: [ node02 ] Failure : Failed Resource Actions: MARIADB_monitor_20000 on node01 'unknown error' (1): call=381817, status=complete, exitreason='MariaDB slave io has failed (1236): Got fatal error 1236 from master when reading data from binary log: 'Could not find GTID sta', last-rc-change='Sat Feb 15 14:02:46 2020', queued=0ms, exec=183ms

Because in MariaDB I'll set master slave and node01 is master.

So how, when I declare promotable resource i could say "node01 is the master" ?

Thanks for you're help

Notes I read this : https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/README.mariadb.md

guidtz avatar Feb 15 '20 13:02 guidtz