[Pacemaker] Shouldn't colocation -inf: be mandatory?

Vadym Chepkov vchepkov at gmail.com
Thu Jun 17 12:39:59 UTC 2010


On Jun 17, 2010, at 7:15 AM, Dejan Muhamedagic wrote:

> On Wed, Jun 16, 2010 at 08:54:37AM -0400, Vadym Chepkov wrote:
>> 
>> On Jun 15, 2010, at 3:52 PM, Dejan Muhamedagic wrote:
>> 
>>> On Tue, Jun 15, 2010 at 12:53:07PM -0400, Vadym Chepkov wrote:
>>>> 
>>>> On Jun 15, 2010, at 9:26 AM, Vadym Chepkov wrote:
>>>>>>> 
>>>>>>> what about this part? what do I need to do to prevent them from running on different nodes for sure?
>>>>>> 
>>>>>> You can't have it both ways.
>>>>>> Either they have to run on the same node or they can remain active
>>>>>> when one or more die.
>>>>>> 
>>>>>> Although you could do:
>>>>>> 
>>>>>> d1 ( d2 d3 d4 )
>>>>>> 
>>>>>> That would almost get what you want, unless d1 dies.
>>>>> 
>>>>> I guess I would have to keep the most significant as an anchor, I can
>>>>> leave with it.
>>>>> Unfortunately, as far as I understand, there is no way do define this
>>>>> in shell config now, because shell adds sequential=false when it sees
>>>>> ().
>>> 
>>> Yes it does. So, you want to have two adjacent sequential sets in
>>> one constraint? Not very elegant, but I guess that this would do
>>> until we figure out how to represent it:
>>> 
>>> colocation c1 inf: p1:Started p2 p3 p4
>>> 
>>> In xml:
>>> 
>>>     <rsc_colocation id="c1" score="500">
>>>       <resource_set id="c1-0" role="Started">
>>>         <resource_ref id="p1"/>
>>>       </resource_set>
>>>       <resource_set id="c1-1">
>>>         <resource_ref id="p2"/>
>>>         <resource_ref id="p3"/>
>>>         <resource_ref id="p4"/>
>>>       </resource_set>
>>>     </rsc_colocation>
>>> 
>>> Thanks,
>> 
>> But I think it should be at the end, like this:
>> 
>> colocation together 500: d1 d2 anchor:Started
>> 
>> to use the "anchor" approach? Right?
> 
> I don't know what do you want. This was just about how to produce
> two adjacent sequential resource sets.
> 


I was trying to find a configuration that will allow to have several resources always run on the same node,
but to be independent, i.e., don't stop if another one dies. In order to do it, Andrew suggested to make one of the resources as a most significant, see above. This idea can be transformed to a working solution when you just add a pseudo-resource, which will never ever die (anchor), and Dummy agent will fill the bill.

so, provided we need 2 resources, d1 and d2, locked together, but be independent, one would create a constraint like this:

primitive anchor ocf:pacemaker:Dummy
colocation together inf: (d1 d2) anchor

and this seems to be doing the trick nicely.

Vadym









More information about the Pacemaker mailing list