[Pacemaker] Favor one node during stonith?

Digimer lists at alteeve.ca
Wed Aug 13 16:27:00 UTC 2014


On 13/08/14 11:37 AM, Andrey Borzenkov wrote:
> В Wed, 13 Aug 2014 08:56:58 -0400
> Digimer <lists at alteeve.ca> пишет:
>
>> On 13/08/14 08:37 AM, Andrey Borzenkov wrote:
>>> Hi,
>>>
>>> Sorry for may be basic question, but it is my first Linux HA project.
>>>
>>> I (will) have two node cluster in active/passive configuration -
>>> single application on one node and second as standby; application si
>>> implemented as master/slave clone. Is it possible to prioritize node,
>>> that have active application? So that in case of split brain passive
>>> node gets killed?
>>>
>>> Usually this is done using staggered delay for fencing requests. I
>>> think that it may be possible to implement in pacemaker using rules,
>>> but I'm a bit uneasy about how to express it. Rule should select a
>>> node where master is currently active, not fixed node.
>>>
>>> Thank you in advance!
>>>
>>> -andrei
>>
>> Hi Andrei,
>>
>>     "Basic questions" is how you avoid mistakes, so please never
>> apologize for asking them. I sure ask my own basic questions... :P
>>
>>     First up, a little semantics; "split-brain" is what happens when
>> fencing fails. Your asking what happens when the connection between the
>> nodes break when both nodes are otherwise happy (sometimes called a
>> "partitioning of the cluster", though I don't think there is an official
>> term).
>>
>>     You are right in guessing that it is "delay" to set this. You add the
>> attribute 'delay="15"' to the fence method. You put the delay attribute
>> on the node you want to win. Here is an example;
>>
>> http://clusterlabs.org/wiki/STONITH_Levels#Configuring_The_Fence_Methods
>>
>>     In that example, the node called "pcmk-1" has the 'delay' set, so it
>> will get a 15 second head start in fencing "pcmk-2". It works that way
>> because what it does is tell the cluster "If you want to fence 'pcmk-1',
>> pause for 15 seconds before doing so". So in a 2-node cluster
>> partitioning, both would initiate a fence against the other immediately,
>> but pcmk-2 would pause before fencing pcmk-1, where pcmk-1 would *not*
>> pause before fencing pcmk-2.
>>
>
>
> It statically assigns priorities to cluster nodes. I need to
> dynamically assign higher priority (lower delay) to a node that is
> currently running application to ensure that application survives. It
> was relatively easy in other cluster products I worked with, but I
> cannot figure out how to do it in pacemaker so far.
>
> regards,
>
> -andrei

Hrm, one of the developers would need to speak to this. It may be 
possible, but if so, I don't know how.

If I was in that position, I'd probably write a little script that 
monitors where the principle service is running and then updates the 
config if needed. Something on a 1 minute or 5 minute cron job...

-- 
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 Pacemaker mailing list