[ClusterLabs] Antw: [EXT] Re: Constraint question

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Wed Oct 6 09:40:36 EDT 2021


>>> "john tillman" <johnt at panix.com> schrieb am 06.10.2021 um 14:47 in
Nachricht
<0c279845fccd177a8f06e6bb7b766913.squirrel at mail.panix.com>:
>>  On Tue, 2021‑10‑05 at 18:05 ‑0400, john tillman wrote:
>>> Is it possible for a resource *not* to stop if a colocation
>>> constrained
>>> resource stops on all nodes?
>>>
>>> My configuration per 'pcs constraint' output:
>>>
>>> Location Constraints:
>>> Ordering Constraints:
>>> Colocation Constraints:
>>>   TheService with TheVIP
>>>   TheVip with TheDB‑clone
>>> Ticket Constraints:
>>>
>>> On boot, TheDB starts on a node and the other resources follow it and
>>> start there too.  All's well.
>>>
>>> (Understand that the scenario below is part of a testing step.)
>>>
>>> If I stop all the mysql database clones via "pcs resource disable" I
>>> see
>>> the VIP and service resources also stop.
>>>
>>> So is there a way to configure the cluster so the service and VIP
>>> resources remain running on the last node they were on when all the
>>> databases are stopped?
>>>
>>> Best Regards,
>>> John
>>
>> Hi,
>>
>> Yes, make the colocation optional (i.e. use a finite integer score)
>> ‑‑
>> Ken Gaillot <kgaillot at redhat.com>
>>
>> _______________________________________________
>> Manage your subscription:
>> https://lists.clusterlabs.org/mailman/listinfo/users 
>>
>> ClusterLabs home: https://www.clusterlabs.org/ 
>>
>>
> 
> Ah, thank you Ken.  I'm glad it was something simple.  And I apologize for
> not including my INFINITY scores in my initial email.
> 
> So I set the score on the VIP/DB constraint score to "100" and it is now
> doing what I was looking for; when all the databases stop, the vip and
> service keep running.
> 
> I'm curious but would would a score of "1" been as successful as "100" or
> as successful as "1000"?

Depends: If you add node preferences at score 2 and a colocation at score 1,
the node preference would probably win.
You get the idea...

> 
> Best Regards,
> John
> 
> 
> 
> 
> 
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users 
> 
> ClusterLabs home: https://www.clusterlabs.org/ 





More information about the Users mailing list