[Pacemaker] symmetric anti-collocation

Andrew Beekhof andrew at beekhof.net
Sat Nov 13 11:20:56 UTC 2010


On Fri, Nov 12, 2010 at 5:27 PM, Alan Jones <falancluster at gmail.com> wrote:
> On Thu, Nov 11, 2010 at 11:31 PM, Andrew Beekhof <andrew at beekhof.net> wrote:
>>> colocation X-Y -2: X Y
>>> colocation Y-X -2: Y X
>>
>> the second one is implied by the first and is therefore redundant
>
> If only that were true!

It is. I know exactly how my code works in this regard.
More than likely a score of -2 is simply too low to have any effect.

> What happens with the first rule is that other constraints that force
> Y to a node will evict X but not the other way around.
> What I'm doing is to first apply a "slight" preference for each
> resource to each node:
> location X-nodeA X 1: nodeA
> location Y-nodeB Y 1: nodeB
> And then impose absolute constraints that come from the outside environment.
> In the particular case that has a problem, the constraint looks like:
> location X-not-nodeA X -inf: nodeA
> The behavior I expected was for X to be placed on nodeB and Y to
> "anti-colocate" onto nodeA because our colocation rule is stronger
> than the node preference rule.  What happens instead is that both X
> and Y run on nodeB.
> The similar constraint on Y (by itself) does work:
> location Y-not-nodeB Y -inf: nodeB
> and results in Y running on nodeA and X running on nodeB.  This is the
> case whether I have one colocation rule or two, i.e. the second
> colocation rule is ignored.
>
> Looking at the code, I think the solution would be to short-circuit
> the recursion when you can only run on one node due to -inf rules
> rather than on a loop.  Obviously, it would not be a simple change and
> needs some thought.
> If you have any other suggestions let me know.
> Alan
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>




More information about the Pacemaker mailing list