[Pacemaker] Colocation set options (pcs syntax)

Chris Feist cfeist at redhat.com
Tue Mar 4 21:57:48 UTC 2014


On 02/28/2014 02:32 AM, Asgaroth wrote:
>
>> pcs constraint colocation set fs_ldap-clone sftp01-vip ldap1 sequential=true
>>
>> Let me know if this does or doesn't work for you.
>
> I have been testing this now for a couple days and I think I must be doing
> something wrong, firstly though, the command itself completes successfully:
>
> # pcs constraint show --full
> <snip>
>    Resource Sets:
>      set fs_ldap-clone sftp01-vip ldap1 sequential=true (id:pcs_rsc_set)
> (id:pcs_rsc_colocation)
>
> However, if I try to test it by moving, for example, the "sftp01-vip" resource
> group to another node, then is does not move the ldap1 service with it, example
> below:

I think what you want is a resource group, that will keep all the resources 
together.  A resource set just simplifies creating an A -> B -> C ordering.

If you put fs_ldap-clone, sftp01-vip & ldap1 all in a group they will stay 
together.  (You can then assign the location constraints to the group to set a 
preferred node).

Thanks,
Chris

>
> Cluster state before resource move:
> http://pastebin.com/a13ZhyRq
>
> Then I do "pcs resource move sftp01-vip bfievsftp02", which moves resources to
> the node (except the associated ldap1 service)
>
> Cluster state after the move:
> http://pastebin.com/BSyTBEhX
>
> Full constraint list:
> http://pastebin.com/ng6m4C1Z
>
> Here is what I am trying to achieve:
> [1] The sftp0[1-3]-vip groups each have a prefered node (sftp01-vip=node1,
> sftp02-vip=node2, sftp03-vip=node3
> [2] The sftp0[1-3] lsb resources are colocated with sftp0[1-3]-vip groups
> [3] The ldap[1-3] lsb resources are colocated with sftp0[1-3]-vip groups
>
> I managed to achieve the above using logic contraints as listed in the
> constraint output, however, the sftp0[1-3] and ldap[1-3] lsb resources also
> depend on fs_cdr-clone and fs_ldap-clone respectively, being available.
>
> I thought I would be able to achive that file system dependancy using the
> colocation set, but this does not seem to work the way I am expecting it to, or,
> quite possibly, my logic may be slightly(largely) off :)
>
> How would I ensure, that in the case of a node failure, the vip group moves to a
> node which has the fs_cdr and fs_ldap file system resources available? If I can
> do that, then, I can keep the colocation rule for the sftp/ldap service with the
> vip group. Or am I thinking about this the wrong way around?
>
> Any tips/suggestions would be appreciated.
>
> Thanks
>





More information about the Pacemaker mailing list