[ClusterLabs Developers] Mariadb semi-sync resource agent

Nils Carlson pyssling at ludd.ltu.se
Tue Aug 8 06:13:18 EDT 2017


Hi,

I've created a pull-request for what seems to me to be a working mariadb 
resource-agent that reliably handles failure without losing data.
The pull-request is here:

https://github.com/ClusterLabs/resource-agents/pull/929

I would be happy for all feedback. I have some comments myself:

The resource-agent waits for all nodes in a "node list" to come online. 
This concept was taken from the pgsql resource agent. During failover 
the monitor action detects the lack of a master and write a global 
transaction id (GTID) to attrd. Once n - 1 nodes have written the 
transaction id the node with the highest GTID is promoted to master. I 
was hoping to do this using a notifier, but there does not seem to be 
such a notifier for master failure.

Question: Does pacemaker lack a notifier to notify slaves of a master 
failure? Having such a notifier would be very helpful.

I monitor the health of the slaves using "SHOW SLAVE STATUS" in mariadb, 
but this sometimes hangs for some time (when the slave threads are 
busy). As the monitor action is in charge of handling failovers having a 
high timeout and low monitor interval means slow failovers.

Question: Is there any well established way of running commands 
asynchronously from the monitor action?

Otherwise this seems to work quite well, I have posted the pull request 
with some questions about the mariadb settings to mariadb-discuss. I 
hope to get some feedback from there on the need for some parameters 
(like the sync interval for example, currently set to sync as much as 
possible.)

Best Regards,
Nils Carlson




More information about the Developers mailing list