[ClusterLabs] Antw: Resource Priority

Ken Gaillot kgaillot at redhat.com
Wed Feb 1 10:16:19 EST 2017


On 02/01/2017 09:07 AM, Ulrich Windl wrote:
>>>> Chad Cravens <chad.cravens at ossys.com> schrieb am 01.02.2017 um 15:52 in
> Nachricht
> <CAKDUw3iwhzzw7F_jFAjRb3zsgA0w_W+GQT=QXm2XQ9OGyfujVQ at mail.gmail.com>:
>> 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] <http://www.ossys.com>
>> [image: http://www.linkedin.com/company/open-source-systems-llc]
>> <http://www.linkedin.com/company/open-source-systems-llc>   [image:
>> https://www.facebook.com/OpenSrcSys] <https://www.facebook.com/OpenSrcSys>
>>    [image: https://twitter.com/OpenSrcSys] <https://twitter.com/OpenSrcSys>
>>      [image: http://www.youtube.com/OpenSrcSys]
>> <http://www.youtube.com/OpenSrcSys>   [image: http://www.ossys.com/feed]
>> <http://www.ossys.com/feed>   [image: contact at ossys.com] <contact at ossys.com>
>> Chad Cravens
>> (843) 291-8340
>> chad.cravens at ossys.com 
>> http://www.ossys.com 




More information about the Users mailing list