0

I'm trying to configure Pacemaker on Ubuntu 18.04 so I can run a master and a slave and I've been smashing my head against a brick wall all day.

I have two nodes, mysql1 & mysql2 both with MariaDB 10.13 & Pacemaker 1.18 installed.

mysql1 config

bind-address=0.0.0.0
server_id=1
log-basename=master
log-bin=/var/log/mysql/mariadb-bin
binlog-format=row
binlog-do-db=masterdb

mysql2 config

bind-address=0.0.0.0
server-id=2
replicate-do-db=masterdb

Both installations start no problem using systemctl start mysql and I've got master/slave replication configured on them. However, when trying to configure the Pacemaker configuration using pcs, mysql1 starts no problem. mysql2, again starts no problem but eventually pacemaker reports a timeout -

root@mysql1:~# pcs status
Cluster name: mysqlcluster
Stack: corosync
Current DC: mysql2 (version 1.1.18-2b07d5c5a9) - partition with quorum
Last updated: Tue May 28 13:00:21 2019
Last change: Tue May 28 12:56:15 2019 by root via crm_attribute on mysql1

2 nodes configured
2 resources configured

Online: [ mysql1 mysql2 ]

Full list of resources:

 Master/Slave Set: mysql-master [mysql]
     Masters: [ mysql1 ]
     Stopped: [ mysql2 ]

Failed Actions:
* mysql_start_0 on mysql2 'unknown error' (1): call=57, status=Timed Out, exitreason='',
    last-rc-change='Tue May 28 12:54:15 2019', queued=0ms, exec=120002ms


Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled

I've tried a number of things to get this working but nothing has been of use. Here's the pcs command I'm running -

pcs resource create mysql ocf:heartbeat:mysql binary="/usr/sbin/mysqld" config="/etc/mysql/my.cnf" op monitor role="Master" timeout="30s" interval="10s" op monitor role="Slave" timeout="30s" interval="30s" meta notify=true --master

Again, as I mentioned MySQL seems to start fine on both machines and there are no errors recorded in the MySQL log, just the service suddenly gets killed after the 120s timeout. I've also checked pacemaker.log, corosync.log and Googled heavily but there doesn't seem to be much advice out there... I've also tried this setup on CentOS 7 and I'm getting the exact same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.