[ClusterLabs] DRBD promotion based on ping

Klaus Wenninger kwenning at redhat.com
Fri Mar 17 09:22:50 EDT 2017


On 03/17/2017 01:17 PM, Victor wrote:
> Hello,
>
> I have implemented the following pacemaker configuration, and I have a
> problem which I don't understand (and all my net searches were in
> vain, probably not looking for the correct keywords). If the ping
> fails on the Master node, it moves into Slave, but the other node also
> remains a slave (is not promoted). Can somebody tell me what I'm doing
> wrong? I have also tried to add a second rule to the location: "rule
> $role=Master ping: defined ping", so my location had two rules instead
> of one, but it still didn't work.

Did you check if the clones of PING are running on all your nodes?
How do the node-attributes on the nodes look like?

>
> node 1084803074: db-main \
>         attributes standby=off
> node 1084803195: db-slave \
>         attributes standby=off
> primitive DRBD0 ocf:linbit:drbd \
>         params drbd_resource=drbd0 \
>         op monitor role=Master interval=15s \
>         op monitor role=Slave interval=30s \
>         op start interval=0 timeout=240s \
>         op stop interval=0 timeout=100s
> primitive FSDATA Filesystem \
>         params device="/dev/drbd0" directory="/data" fstype=ext4 \
>         meta target-role=Started
> primitive IP IPaddr2 \
>         params ip=5.35.208.178 cidr_netmask=32 nic=eth0
> primitive MYSQLD mysql \
>         params binary="/usr/sbin/mysqld" config="/etc/mysql/my.cnf"
> datadir="/var/lib/mysql" pid="/var/run/mysqld/mysqld.pid"
> socket="/var/run/mysqld/mysqld.sock" user=mysql group=mysql \
>         op start timeout=120s interval=0 \
>         op stop timeout=120s interval=0 \
>         op monitor interval=20s timeout=30s
> primitive PING ocf:pacemaker:ping \
>         params name=ping multiplier=1000 host_list="192.168.1.1
> 192.168.1.2" \
>         op monitor interval=15s timeout=60s start
> group SERVICES FSDATA IP MYSQLD
> ms DRBD_MASTER DRBD0 \
>         meta notify=true master-max=1 master-node-max=1 clone-max=2
> clone-node-max=1 target-role=Master
> clone CL_PING PING \
>         meta interleave=true
> location LOC_DRBD_MASTER_ON_PING DRBD_MASTER \
>         rule $role=Master -inf: not_defined ping or ping number:lte 0
> order SRV_ORDER Mandatory: DRBD_MASTER:promote SERVICES:start
> colocation SRV_RULE inf: DRBD_MASTER:Master SERVICES
> property cib-bootstrap-options: \
>         have-watchdog=false \
>         dc-version=1.1.14-70404b0 \
>         cluster-infrastructure=corosync \
>         cluster-name=debian \
>         stonith-enabled=false \
>         no-quorum-policy=ignore
> rsc_defaults rsc-options: \
>         resource-stickiness=100
>
> Thanks,
> Victor
>
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://lists.clusterlabs.org/mailman/listinfo/users
>
> 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 Users mailing list