Re: [ClusterLabs] Antw: Resource Priority

2017-02-01 Thread Ken Gaillot
On 02/01/2017 09:07 AM, Ulrich Windl wrote:
 Chad Cravens  schrieb am 01.02.2017 um 15:52 in
> Nachricht
> :
>> Hello Cluster Fans!
>>
>> I've had a great time working with the clustering software. Implementing a
>> HUGE cluster solution now (100+ resources) and it's working great!
>>
>> I had a question regarding prioritizing resources. Say I have three nodes
>> (A,B,C) and 2 database resources (DB1, DB2). Database resources normally
>> run on A and B, and both failover to C.
>>
>> What I would like to do is prioritize resource DB1 over DB2 if both have to
>> failover to node C. For example, if DB2 has failed over and is running on
>> node C, and at a later time DB1 fails over to node C, that DB2 would stop
>> (no longer running at all on any node) and DB1 would run. Essentially DB1
>> is kicking DB2 off the cluster. I was wondering if there would be a clean
>> way to implement something like this using standard cluster configurations
>> parameters or if I'd have to create a custom RA script that would run
>> cluster commands to do this?
> 
> Hi!
> 
> What about this?: First use utilization constraints to avoid overloading your 
> nodes (change nodes and each resource). The use priorities for the resources. 
> Now when more resources want to run on a node (C) that the node can deal 
> with, the higher priority resources will succeed. Drawback: Stopping a 
> resource can cause some resource shuffling between nodes. We run a similar 
> configuration with SLES11 for a few years now. If resources are becoming 
> tight, test and development resources have to give way for production 
> resources...
> 
> Regards,
> Ulrich

Utilization attributes are a good idea, if overloading the machine is
your concern.

If the DBs simply can't run together, add a colocation constraint with a
negative score.

In either case, you can use the "priority" meta-attribute to say which
one is preferred when both can't run:

http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#_resource_meta_attributes

>>
>> Thanks in advance! Happy clustering :)
>>
>> -- 
>> Kindest Regards,
>> Chad Cravens
>> (843) 291-8340
>>
>> [image: http://www.ossys.com] 
>> [image: http://www.linkedin.com/company/open-source-systems-llc]
>>    [image:
>> https://www.facebook.com/OpenSrcSys] 
>>[image: https://twitter.com/OpenSrcSys] 
>>  [image: http://www.youtube.com/OpenSrcSys]
>>    [image: http://www.ossys.com/feed]
>>    [image: cont...@ossys.com] 
>> Chad Cravens
>> (843) 291-8340
>> chad.crav...@ossys.com 
>> http://www.ossys.com 

___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[ClusterLabs] Antw: Resource Priority

2017-02-01 Thread Ulrich Windl
>>> Chad Cravens  schrieb am 01.02.2017 um 15:52 in
Nachricht
:
> Hello Cluster Fans!
> 
> I've had a great time working with the clustering software. Implementing a
> HUGE cluster solution now (100+ resources) and it's working great!
> 
> I had a question regarding prioritizing resources. Say I have three nodes
> (A,B,C) and 2 database resources (DB1, DB2). Database resources normally
> run on A and B, and both failover to C.
> 
> What I would like to do is prioritize resource DB1 over DB2 if both have to
> failover to node C. For example, if DB2 has failed over and is running on
> node C, and at a later time DB1 fails over to node C, that DB2 would stop
> (no longer running at all on any node) and DB1 would run. Essentially DB1
> is kicking DB2 off the cluster. I was wondering if there would be a clean
> way to implement something like this using standard cluster configurations
> parameters or if I'd have to create a custom RA script that would run
> cluster commands to do this?

Hi!

What about this?: First use utilization constraints to avoid overloading your 
nodes (change nodes and each resource). The use priorities for the resources. 
Now when more resources want to run on a node (C) that the node can deal with, 
the higher priority resources will succeed. Drawback: Stopping a resource can 
cause some resource shuffling between nodes. We run a similar configuration 
with SLES11 for a few years now. If resources are becoming tight, test and 
development resources have to give way for production resources...

Regards,
Ulrich

> 
> Thanks in advance! Happy clustering :)
> 
> -- 
> Kindest Regards,
> Chad Cravens
> (843) 291-8340
> 
> [image: http://www.ossys.com] 
> [image: http://www.linkedin.com/company/open-source-systems-llc]
>    [image:
> https://www.facebook.com/OpenSrcSys] 
>[image: https://twitter.com/OpenSrcSys] 
>  [image: http://www.youtube.com/OpenSrcSys]
>    [image: http://www.ossys.com/feed]
>    [image: cont...@ossys.com] 
> Chad Cravens
> (843) 291-8340
> chad.crav...@ossys.com 
> http://www.ossys.com 





___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org