[Pacemaker] colocation that doesn't

Tim Serong tserong at novell.com
Tue Nov 23 22:10:38 EST 2010


On 11/24/2010 at 12:32 PM, Alan Jones <falancluster at gmail.com> wrote: 
> On Sat, Nov 20, 2010 at 1:05 AM, Andrew Beekhof <andrew at beekhof.net> wrote: 
> > Then -2 obviously isn't big enough is it. 
>  
> I need a value between and not including -inf and -2 that will work. 
> All the values I've tried don't, so I'm open to suggestions. 
>  
> > Please read and understand: 
> >    
> http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/ 
> s-resource-colocation.html 
>  
> The way I read the with-rsc description it is in direct conflict with 
> your comment from Nov. 11th (below), 
> so I'm truly confused. 
>  
> >> colocation X-Y -2: X Y 
> >> colocation Y-X -2: Y X 
> >the second one is implied by the first and is therefore redundant 
>  
> > For how colocation constraints actually work instead of inventing your own  
> rules. 
>  
> I'm interested in inventing rules, I'm trying to express the 
> constraints of my application. 
> So far, I have not been able to do so. 

Instead of:

  colocation resX-resY -2: resX resY

Try:

  colocation resX-resY -2: resY resX

Because:

The cluster decides where to put "with-rsc" (the second one), then decides
where to put "rsc" (the first one).  You have:

  location resX-nodeA resX -inf: nodeA.acme.com
  location resY-loc resY 1: nodeB.acme.com

If it decides where to put resY first, it puts resY on nodeB.  Then it tries
to place resX, wants to place it where resY is not (nodeA), but can't, due to
the -inf score for resX on nodeA.  So  in this case, resX lands on nodeB as
well.

If it decides where to put resX first, it puts resX on nodeB because of the
-inf score for nodeA.  Then it puts resY on nodeA, because of the -2 score
for the colocation constraint.

HTH,

Tim


-- 
Tim Serong <tserong at novell.com>
Senior Clustering Engineer, OPS Engineering, Novell Inc.







More information about the Pacemaker mailing list