[DRBD-user] Problem with crm fencing

Digimer lists at alteeve.ca
Mon Sep 30 19:38:51 CEST 2013

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On 30/09/13 04:02, Lars Ellenberg wrote:
> On Sun, Sep 29, 2013 at 10:25:12PM -0700, Digimer wrote:
>> I sorted it out.
>>
>> I thought it would be like 'obliterate-peer.sh' or 'rhcs_fence' on cman
>> where cman just had to be running for the fence-handler script to work.
>> I dug into crm-fence-peer.sh and saw that it was parsing cib.xml. I'd
>> not configured DRBD inside pacemaker, so the fence handler was failing.
>>
>> Thanks for letting me rubber-ducky debug on the list. :)
> 
> Yep.
> 
> The point of the crm-fence-peer.sh script is to tell pacemaker about it.
> 
> It is NOT there to cause the cluster stack to shoot the peer,
> nor to cause the cluster stack to shoot the peer faster.
> 
> It places a constraint for pacemaker,
> so pacemaker won't attempt to promote the resource on the other node.
> 
> And to *avoid* to shoot the peer if just the replication link went down.
> 
> Obviously, if pacemaker is not even responsible for promoting,
> telling pacemaker to not promote something it does not even know about
> cannot possibly help ;-)
> 
> Using "become-primary" when using pacemaker
> is almost always not the best idea.

Right, once you know the logic, it makes sense. However, as someone
coming from the RHCS world, this is not self-evident. There, the idea
is; "DRBD detected an impending split brain and asked me to kill node X,
so do it". There is no examination of how or if DRBD is configured in
the cluster.

The "become-primary-on" not being set makes sense once DRBD has been
configured in pacemaker. Again though, it's different from how I did
things under RHCS. There, I have DRBD managed as a simple script
service, so the drbd resource agent is not used. There, rgmanager simply
called '/etc/init.d/drbd start'.

In any case, my build order was "setup cman + fencing, test. setup drbd
+ fence-handler, test. add DRBD to rgmanager". I was following the same
order when learning pacemaker, so I was testing that DRBD would fence
before I moved on to the actual pacemaker config stage. Now, this said,
I plan to use the actual DRBD resource agent in pacemaker, so it's not a
big deal for me to hold off fence testing until it's been configured in
pacemaker, now that I know how it works.

Cheers

-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?



More information about the drbd-user mailing list