[ClusterLabs] pacemaker pingd with ms drbd = double masters short time when disconnected networks.

Прокопов Павел prokopov at experium.ru
Tue Dec 19 02:19:41 EST 2017


Hello!

pacemaker pingd with ms drbd = double masters short time when 
disconnected networks.

My crm config:

node 168885811: pp-pacemaker1.heliosoft.ru
node 168885812: pp-pacemaker2.heliosoft.ru
primitive drbd1 ocf:linbit:drbd \
     params drbd_resource=drbd1 \
     op monitor interval=60s \
     op start interval=15 timeout=240s \
     op stop interval=15 timeout=240s \
     op monitor role=Master interval=30s \
     op monitor role=Slave interval=60s
primitive fs_drbd1 Filesystem \
     params device="/dev/drbd1" directory="/mnt/drbd1" fstype=ext4 
options=noatime
primitive pinger ocf:pacemaker:ping \
     params host_list=10.16.4.1 multiplier=100 \
     op monitor interval=15s \
     op start interval=0 timeout=5s \
     op stop interval=0
primitive vip IPaddr2 \
     params ip=10.16.5.227 nic=eth0 \
     op monitor interval=10s
primitive vip2 IPaddr2 \
     params ip=10.16.254.50 nic=eth1 \
     op monitor interval=10s
group group_master fs_drbd1 vip vip2
ms ms_drbd1 drbd1 \
     meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 
notify=true
clone pingerclone pinger \
     meta globally-unique=false
colocation colocation_master inf: ms_drbd1:Master group_master
location location_master_ms_drbd1 ms_drbd1 \
     rule $role=Master -inf: not_defined pingd or pingd lte 0
order main_order Mandatory: pingerclone:start ms_drbd1:promote 
group_master:start
property cib-bootstrap-options: \
     stonith-enabled=false \
     no-quorum-policy=ignore \
     default-resource-stickiness=500 \
     cluster-name=pp1

root at pp-pacemaker2:~# crm_mon -1
Stack: corosync
Current DC: pp-pacemaker2.heliosoft.ru (version 1.1.16-94ff4df) - 
partition with quorum
Last updated: Fri Dec 15 13:48:10 2017
Last change: Fri Dec 15 13:46:38 2017 by root via cibadmin on 
pp-pacemaker1.heliosoft.ru

2 nodes configured
7 resources configured

Online: [ pp-pacemaker1.heliosoft.ru pp-pacemaker2.heliosoft.ru ]

Active resources:

  Resource Group: group_master
      fs_drbd1    (ocf::heartbeat:Filesystem):    Started 
pp-pacemaker1.heliosoft.ru
      vip    (ocf::heartbeat:IPaddr2):    Started 
pp-pacemaker1.heliosoft.ru
      vip2    (ocf::heartbeat:IPaddr2):    Started 
pp-pacemaker1.heliosoft.ru
  Master/Slave Set: ms_drbd1 [drbd1]
      Masters: [ pp-pacemaker1.heliosoft.ru ]
      Slaves: [ pp-pacemaker2.heliosoft.ru ]
  Clone Set: pingerclone [pinger]
      Started: [ pp-pacemaker1.heliosoft.ru pp-pacemaker2.heliosoft.ru ]
#end crm_mon

When I disconnect pp-pacemaker2 from all networks, I have:
root at pp-pacemaker2:~# crm_mon -1
Stack: corosync
Current DC: pp-pacemaker2.heliosoft.ru (version 1.1.16-94ff4df) - 
partition with quorum
Last updated: Fri Dec 15 13:53:15 2017
Last change: Fri Dec 15 13:53:00 2017 by root via cibadmin on 
pp-pacemaker2.heliosoft.ru

2 nodes configured
7 resources configured

Online: [ pp-pacemaker2.heliosoft.ru]
OFFLINE: [pp-pacemaker1.heliosoft.ru ]

Active resources:

  Resource Group: group_master
      fs_drbd1    (ocf::heartbeat:Filesystem):    Started 
pp-pacemaker2.heliosoft.ru
      vip    (ocf::heartbeat:IPaddr2):    Started 
pp-pacemaker2.heliosoft.ru
      vip2    (ocf::heartbeat:IPaddr2):    Started 
pp-pacemaker2.heliosoft.ru
  Master/Slave Set: ms_drbd1 [drbd1]
      Masters: [ pp-pacemaker2.heliosoft.ru ]
  Clone Set: pingerclone [pinger]
      Started: [ pp-pacemaker2.heliosoft.ru ]
#end crm_mon

Wait 5 seconds.

root at pp-pacemaker2:~# crm_mon -1
Stack: corosync
Current DC: pp-pacemaker2.heliosoft.ru (version 1.1.16-94ff4df) - 
partition with quorum
Last updated: Fri Dec 15 13:48:10 2017
Last change: Fri Dec 15 13:46:38 2017 by root via cibadmin on 
pp-pacemaker1.heliosoft.ru

2 nodes configured
7 resources configured

Online: [ pp-pacemaker2.heliosoft.ru
OFFLINE: [pp-pacemaker1.heliosoft.ru ]

Active resources:

  Master/Slave Set: ms_drbd1 [drbd1]
      Slaves: [ pp-pacemaker2.heliosoft.ru ]
  Clone Set: pingerclone [pinger]
      Started: [ pp-pacemaker2.heliosoft.ru ]
#end crm_mon

Why pp-pacemaker2 first become a master? It breaks drdb.







More information about the Users mailing list