[Pacemaker] CRM property mysql_replication

Dejan Muhamedagic dejanmm at fastmail.fm
Fri Jul 17 03:46:02 EDT 2015


Hi,

On Wed, Jul 15, 2015 at 12:58:09PM +0200, Michal Fiala wrote:
> 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?

The attribute is not listed in the PE meta-data and therefore
considered an error. You can make crmsh less strict like this:

# crm option set core.check_mode relaxed

It'll still print the error, but your changes are going to be
committed.

Given that it is common practice for some RA to stuff its
attributes into cluster properties, this should be handled
better. Probably by not running the PE meta-data check for
property elements which are not "cib-bootstrap-options".

Thanks,

Dejan


> Thanks
> 
> Regards
> 
> Michal
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org




More information about the Pacemaker mailing list