[Pacemaker] cli configuration and resource sets
Andrew Beekhof
andrew at beekhof.net
Tue Feb 23 09:19:48 UTC 2010
On Fri, Feb 19, 2010 at 5:27 PM, Cristian Mammoli - Apra Sistemi
<c.mammoli at apra.it> wrote:
> Andrew Beekhof wrote:
>>
>> On Fri, Feb 19, 2010 at 1:06 PM, Cristian Mammoli - Apra Sistemi
>> <c.mammoli at apra.it> wrote:
>>>
>>> Dejan Muhamedagic wrote:
>>>
>>>> Sorry, didn't read careful enough, was distracted by the actions
>>>> in the description. Yes, you need both the order and the
>>>> collocation.
>>>>>
>>>>> Basically what I want to achieve is the same behaviour of an
>>>>> unordered group of heartbeat 2.1.4.
>>>>
>>>> Why don't you keep the unordered group?
>>>
>>> Uhm, in heartbeat 2.1.4 i could specify "collocated=true/false" and
>>> "ordered="true/false" for the groups. As I said I nedd an unordered,
>>> collocated group.
>>>
>>> In pacemaker I didn't find a way to specify this options for group
>>> (through
>>> the gui or the cli). According to the docs:
>>
>> Use a resource set:
>>
>> http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-resource-sets-collocation.html
>
> So if I don't get the docs wrong this:
>
> <constraints>
> <rsc_order id="order-srvha01" score="INFINITY">
> <resource_set id="order-rs-drbd1" role="Master">
> <resource_ref id="ms-drbd1"/>
> </resource_set>
> <resource_set id="order-rs-fs1">
> <resource_ref id="fs-datastore1"/>
> </resource_set>
> <resource_set id="order-rs-vm1" sequential="false">
> <resource_ref id="w2003R2-1"/>
> <resource_ref id="w2003R2-3"/>
> <resource_ref id="openfiler"/>
> </resource_set>
> </rsc_order>
> <rsc_colocation id="colo-srvha01" score="INFINITY" >
> <resource_set id="colo-rs-vm1" sequential="false" role="Started">
> <resource_ref id="w2003R2-1"/>
> <resource_ref id="w2003R2-3"/>
> <resource_ref id="openfiler"/>
> </resource_set>
> <resource_set id="colo-rs-fs1" role="Started">
> <resource_ref id="fs-datastore1"/>
> </resource_set>
> <resource_set id="colo-rs-drbd1" role="Master">
> <resource_ref id="ms-drbd1"/>
> </resource_set>
> </rsc_colocation>
> </constraints>
>
> should do the trick and:
>
> promote drbd1 on srvha01, start fs-datastore1 on srvha01, start virtual
> machines on srvha2 (in any order). Right?
> I don't get why resources should be placed in reverse order in colocations
> anyway.
It is a bi-product of how it is read, top-to-bottom.
For the order (a -> b -> c), its far more natural to read it as:
a
b
c
For colocation though, you usually want c with b and b with c (ie. c
-> b -> a), which is easiest to read it as:
c
b
a
More information about the Pacemaker
mailing list