[Pacemaker] CRM property mysql_replication

Michal Fiala fiala at mobil.cz
Wed Jul 15 10:58:09 UTC 2015


Hi,

I am running 2 node cluster with simple configuration for mysql
replication. Resource agent mysql (ocf:heartbeat:mysql) saves
replication info into property mysql_replication but this property is is
unknown by crm shell when changing configuration.

using distro Gentoo and package versions:

sys-cluster/pacemaker-1.1.12-r2
sys-cluster/corosync-2.3.4-r1
sys-cluster/resource-agents-3.9.6
sys-cluster/crmsh-2.1.4

(The same problem exists also on Ubuntu LTS 14.04, package version are
similar to Gentoo's)

crm configure show

# nodes
node 1: rajdev2
node 2: rajdev3
# primitives
primitive pri_mysqld mysql \
        params binary="/usr/sbin/mysqld" client_binary="/usr/bin/mysql"
config="/etc/mysql/my.cnf" log="/var/log/mysql/mysqld.err"
datadir="/databaze" user=mysql group=mysql
pid="/var/run/mysqld/mysqld.pid" socket="/var/run/mysqld/mysqld.sock"
replication_user=repl replication_passwd="foobar" \
        op start interval=0 timeout=300s \
        op stop interval=0 timeout=1800s \
        op monitor interval=5s role=Master \
        op monitor interval=6s role=Slave \
        meta migration-threshold=1
# MSL
ms msl_mysqld pri_mysqld \
        meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1
notify=true target-role=Started
# Property
property cib-bootstrap-options: \
        stonith-enabled=false \
        no-quorum-policy=ignore \
        symmetric-cluster=true \
        maintenance-mode=false \
        last-lrm-refresh=1436956096 \
        dc-version=1.1.12-561c4cf \
        cluster-infrastructure=corosync
property mysql_replication: \
        pri_mysqld_REPL_INFO="rajdev2|db-bin.000025|120"
rsc_defaults rsc-options: \
        resource-stickiness=100
op_defaults op-options: \
        timeout=30s

Try to change an attribute in crm configuration (for example change
timeout value)

$ crm
crm(live)# configure edit
# change timeout or something else and quit
ERROR: mysql_replication: attribute pri_mysqld_REPL_INFO does not exist
Edit or discard changes (yes to edit, no to discard) (y/n)?

So I have to delete "property mysql_replication", change what I need,
stop a start resource msl_mysqld (this step add property
mysql_replication back)

Please, where can be a problem?

Thanks

Regards

Michal




More information about the Pacemaker mailing list