[Pacemaker] Simple way to prefer resource groups not start on the same node

Dejan Muhamedagic dejanmm at fastmail.fm
Wed Aug 25 13:47:15 UTC 2010


Hi,

On Tue, Aug 24, 2010 at 08:54:58AM -0500, Matthew Schlegel wrote:
> Howdy,
> 
>  
> 
> I am working on setting up a farm of mysql servers using
> heartbeat/pacemaker to control failover and resource location.   Each
> particular mysql server is independent, and when resources are
> available, it should run on a server that isn't doing anything else for
> best performance.   Is there a simple way to express something along the
> lines of 'Only run one resource group per node when possible'?   Ideally
> this same mechanism can be used to balance the number of resource groups
> running on a single node as well.
> 
>  
> 
> Currently the environment has 4 nodes and 4 mysql resource groups.   The
> design allows for both the resource group & node count to grow
> independently as needed.
> 
>  
> 
> I was able to get the expected collocation behavior using a collocation
> rule with a negative score, however, it looks like I would need a full
> matrix of these collocation rules between every resource group, and both
> directions are needed.   I tried doing a 'from group to any' rule, but
> that didn't have any effect.
> 
>  
> 
> I could also use location constraints to have resource groups prefer a
> specific node as its 'home', however, that runs the risk of a failure
> causing a single node to take the load of any resources running on the
> failed node, instead of spreading that load out.

Pacemaker will try to balance the number of resources running on
each node. Not perfect, but there's a good chance that no single
node will run all the resources as you suggest.

I think that doing location preferences is the right way to deal
with this:

location l-mysql1 mysql1 100: node1
etc

If node1 fails, mysql1 would move elsewhere. If the mysql1 fails,
then you can use migration-threshold to control how many times to
try to restart it. Use resource-stickiness to control when
resources fail back.

Finally, how often do you expect your resources/nodes to fail?

Thanks,

Dejan

> Is there a simple way to build this type of behavior?
> 
>  
> 
> Thank you,
> 
>  
> 
>  
> 
> Matthew Schlegel
> 
> System Analyst
> 
>  
> 
> eXcellence in IS Solutions, Inc. (X-ISS)
> 
> Office:  713.862.9200 x203
> 
> http://www.x-iss.com <http://www.x-iss.com> 
> 
>  
> 
> Making IT Work for You 
> HPC & Enterprise IT Solutions
> 
>  
> 
>  
> 
> 
> NOTICE:
> This message may contain privileged or otherwise confidential information.
> If you are not the intended recipient, please immediately advise the sender
> by reply email and delete the message and any attachments without using,
> copying or disclosing the contents.
> 
> 



> _______________________________________________
> 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