[Pacemaker] Drbd primary never on SyncTarget

Johan Verrept Johan.Verrept at able.be
Thu Sep 3 14:48:37 UTC 2009


Hi Florian,

  thank you for answering so swiftly!

> >    I am using the heartbeat::drbd OCF RA.
> 
> That's the problem. Use DRBD 8.3.2, and use the ocf:linbit:drbd resource
> agent that's bundled with it.

I upgraded drbd and switched to that RA. As far as I can see, the values
assigned to the node attributes by the RA are somewhat different but the
mechanism is identical?

As a side issue, I shut down the resources, rewrote the configuration in
the CIB with the new agent and then restarted the resource. The cluster
noticed that the provider changed and stopped the resource and started
it again, succesfully afaict. And then it kept repeating that. I can get
you the logs if you think this is interesting enough. Rebooting both
nodes fixed the problem.

> And, this discussion is probably best handled on the drbd-user list, not
> this one.

I used this list because I assumed I am making a mistake in my pacemaker
configuration. I still am, tbh.

The behaviour I am seeing now is (because of the new RA?) that if I
delete the location rules, the service (master-group) is started on the
synctarget and if I add them again, it is stopped on the synctarget but
does not start on the other node (which keeps the slave-group).
If the syncing ends, the master-group is not started and both nodes
remain secondary.

In essence, I have two service groups. The slave group is optional and
should never be run on the same node as the master group. The idea is
that the master-group always runs and the slave-group on the node that
isn't running the master-group. One of the nodes (node-master) is
preferred for running the master-group. (Actually, I configured the
master group to follow the drbd primary and I force the drbd primary
around).

This is my full configuration:

node $id="00963868-845b-4dc4-927b-ef8b86ea38b8" node-master.domain.be \ 
        attributes internet-status="online" seclan-status="online"
node $id="d8481b1a-97a3-4852-89de-ec9ab1828b15" node-slave.domain.be \  
        attributes internet-status="online" seclan-status="online"
primitive drbd0 ocf:linbit:drbd \
        params drbd_resource="drbd0" \
        op monitor interval="11s" role="Master" timeout="30s" \
        op monitor interval="13s" role="Slave" timeout="30s"
primitive failover-ip-entries-0-0 ocf:heartbeat:IPaddr \
        params ip="192.168.180.254" \
        op monitor interval="10s"
primitive failover-ip-entries-1-0 ocf:heartbeat:IPaddr \
        params ip="192.168.250.254" \
        op monitor interval="10s"
primitive fs-master ocf:heartbeat:Filesystem \
        params fstype="ext3" directory="/data" device="/dev/drbd0"
primitive internet-monitor-primitive ocf:local:NetworkStatus \
        meta failure-timeout="30s" \  
        params networktype="internet" \
        op monitor interval="13s"
primitive master-services ocf:local:MasterServices \
        meta priority="500" failure-timeout="900s" \
        op monitor interval="10s"
primitive seclan-monitor-primitive ocf:local:NetworkStatus \
        meta failure-timeout="30s" \
        params networktype="seclan" \
        op monitor interval="11s"
primitive slave-services ocf:local:SlaveServices \
        meta priority="200" \
        op monitor interval="11s"
group master-group fs-master failover-ip-entries-0-0
failover-ip-entries-1-0 master-services
group slave-group slave-services
ms ms-drbd0 drbd0 \
        meta clone-max="2" notify="true" globally-unique="false"
target-role="Started"
clone internet-monitor internet-monitor-primitive \
        meta clone-max="2" globally-unique="false" target-role="Started"
clone seclan-monitor seclan-monitor-primitive \
        meta clone-max="2" globally-unique="false" target-role="Started"
location master-with-internet ms-drbd0 \
        rule $id="master-with-internet-rule" $role="Master" 200: defined
internet-status and internet-status eq online
location master-with-lan ms-drbd0 \
        rule $id="master-with-lan-rule" $role="Master" 400: defined
seclan-status and seclan-status eq online

location ms-drbd0-primary-never-on-synctarget-0 ms-drbd0 \
        rule $id="ms-drbd0-primary-never-on-synctarget-0-rule"
$role="Master" -inf: defined master-drbd0:0 and master-drbd0:0 lt 50
location ms-drbd0-primary-never-on-synctarget-1 ms-drbd0 \
        rule $id="ms-drbd0-primary-never-on-synctarget-1-rule"
$role="Master" -inf: defined master-drbd0:1 and master-drbd0:1 lt 50

location ms-drbd0-primary-on-master ms-drbd0 \
        rule $id="ms-drbd0-primary-on-master-rule" $role="Master" 100:
#uname eq node-master.domain.be
colocation master-group-on-drbd-primary inf: master-group
ms-drbd0:Master
colocation slave-group-on-drbd-secondary inf: slave-group ms-drbd0:Slave
order drbd-before-master-group inf: ms-drbd0:promote master-group:start
order drbd-before-slave-group inf: ms-drbd0:start slave-group:start
property $id="cib-bootstrap-options" \
        stonith-enabled="false" \
        initialisation-complete="true" \
        dc-version="1.0.4-6dede86d6105786af3a5321ccf66b44b6914f0aa" \
        cluster-infrastructure="Heartbeat"

The attributes:

         <nvpair
id="status-d8481b1a-97a3-4852-89de-ec9ab1828b15-master-drbd0:0"
name="master-drbd0:0" value="100"/>
          <nvpair name="master-drbd0:1"
id="status-00963868-845b-4dc4-927b-ef8b86ea38b8-master-drbd0:1"
value="100"/>


Something tells me it is related to using -inf in my location rules, but
if it is, I do not see the mistake in my logic. Can you explain what I
am doing wrong?

Any other comments on my implementation are very welcome.

Cheers,

   Johan





More information about the Pacemaker mailing list