Mailing List Archive

pcs group colocation and ping rules
Hi,

I was wondering if anybody can tell me what is the best way to replicate
the following crm commands in pcs. It seems pcs cannot do any
collocation rules using groups (or I just do not know how to properly do
it). I was also not able to figure out how to colocate a drbd resource
on the connected node using ping and rules.

These are the relevant entries one uses with crm:

group fileserver fs_export fs_scratch ClusterIP1 ClusterIP1arp nfs samba \
meta target-role="Started"

primitive pingd ocf:pacemaker:ping \
params host_list="10.0.0.1" multiplier="100" \
op monitor interval="5s" timeout="30s"

clone pingd-clone pingd \
params ping-dampen="5s" ping-multiplier="100"
ping-hosts="10.0.0.1" \
meta target-role="Started"

location ms-drbd_export-on-connected-node ms-drbd_export \
rule $id="ms-drbd_export-on-connected-node-rule" $role="Master"
-inf: not_defined pingd or pingd lte 0

How would I get this done with pcs? I pretty much had to downgrade to
the older pacemaker packages that had crm included to configure this
cluster.

Thanks in advance,

Diego

_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
Re: pcs group colocation and ping rules [ In reply to ]
On 05/13/2013 10:03 AM, Diego Remolina wrote:
> Hi,
>
> I was wondering if anybody can tell me what is the best way to replicate
> the following crm commands in pcs. It seems pcs cannot do any
> collocation rules using groups (or I just do not know how to properly do
> it). I was also not able to figure out how to colocate a drbd resource
> on the connected node using ping and rules.
>
> These are the relevant entries one uses with crm:
>
> group fileserver fs_export fs_scratch ClusterIP1 ClusterIP1arp nfs samba \
> meta target-role="Started"
>
> primitive pingd ocf:pacemaker:ping \
> params host_list="10.0.0.1" multiplier="100" \
> op monitor interval="5s" timeout="30s"
>
> clone pingd-clone pingd \
> params ping-dampen="5s" ping-multiplier="100"
> ping-hosts="10.0.0.1" \
> meta target-role="Started"
>
> location ms-drbd_export-on-connected-node ms-drbd_export \
> rule $id="ms-drbd_export-on-connected-node-rule" $role="Master"
> -inf: not_defined pingd or pingd lte 0
>

Seems like I missed one entry:

colocation ms-drbd_export-with-fileserver inf: ms-drbd_export:Master
fileserver

Diego

_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
Re: pcs group colocation and ping rules [ In reply to ]
On 14/05/2013, at 12:08 AM, Diego Remolina <diego.remolina@physics.gatech.edu> wrote:

> On 05/13/2013 10:03 AM, Diego Remolina wrote:
>> Hi,
>>
>> I was wondering if anybody can tell me what is the best way to replicate
>> the following crm commands in pcs. It seems pcs cannot do any
>> collocation rules using groups (or I just do not know how to properly do
>> it). I was also not able to figure out how to colocate a drbd resource
>> on the connected node using ping and rules.
>>
>> These are the relevant entries one uses with crm:
>>
>> group fileserver fs_export fs_scratch ClusterIP1 ClusterIP1arp nfs samba \
>> meta target-role="Started"
>>
>> primitive pingd ocf:pacemaker:ping \
>> params host_list="10.0.0.1" multiplier="100" \
>> op monitor interval="5s" timeout="30s"
>>
>> clone pingd-clone pingd \
>> params ping-dampen="5s" ping-multiplier="100"
>> ping-hosts="10.0.0.1" \
>> meta target-role="Started"
>>
>> location ms-drbd_export-on-connected-node ms-drbd_export \
>> rule $id="ms-drbd_export-on-connected-node-rule" $role="Master"
>> -inf: not_defined pingd or pingd lte 0
>>
>
> Seems like I missed one entry:
>
> colocation ms-drbd_export-with-fileserver inf: ms-drbd_export:Master fileserver

Most of the common usage is covered in the PCS edition of Clusters from Scratch.
For example:

http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Clusters_from_Scratch/_configure_the_cluster_for_drbd.html

shows:

pcs -f fs_cfg constraint colocation add WebFS WebDataClone INFINITY with-rsc-role=Master

which for you would be:

pcs constraint colocation add ms-drbd_export fileserver INFINITY rsc-role=Master

Granted it seems the syntax could use some work.


_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

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