В Wed, 13 Aug 2014 08:56:58 -0400 Digimer <li...@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 _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org