Discussion:
[Pacemaker] Colocation set options (pcs syntax)
Asgaroth
2014-02-24 14:28:42 UTC
Permalink
Hi All,

I have several resources that depend on a cloned share file system and vip
that need to be up and operational before the resource can start, I was
reading the pacemaker documentation and it looks like colocation sets is
what I am after. I can see in the documentation that you can define a
colocation set and set the sequential option to "true" if you need the
resources to start sequentially, I guess this then becomes an ordered
colocation set which is what I am after, documentation I was reading is
here:

http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-re
source-sets-collocation.html

According to the pcs man page I can setup a colocation set as follows:

colocation set <resource1> <resource2> [resourceN]... [setoptions] ...
[set <resourceX> <resourceY> ...] [setoptions
<name>=<value>...]

However when I run the following command to create the set:

pcs constraint colocation set fs_ldap-clone sftp01-vip ldap1 setoptions
sequential=true

I get an error stating:

Error: Unable to update cib
Call cib_replace failed (-203): Update does not conform to the configured
schema

And then a dump of the current running info base.

Am I reading the man page incorrectly, or is this a bug I need to report?

Thanks
Chris Feist
2014-02-24 21:12:13 UTC
Permalink
Post by Asgaroth
Hi All,
I have several resources that depend on a cloned share file system and vip
that need to be up and operational before the resource can start, I was
reading the pacemaker documentation and it looks like colocation sets is
what I am after. I can see in the documentation that you can define a
colocation set and set the sequential option to "true" if you need the
resources to start sequentially, I guess this then becomes an ordered
colocation set which is what I am after, documentation I was reading is
http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-re
source-sets-collocation.html
colocation set <resource1> <resource2> [resourceN]... [setoptions] ...
[set <resourceX> <resourceY> ...] [setoptions
<name>=<value>...]
pcs constraint colocation set fs_ldap-clone sftp01-vip ldap1 setoptions
sequential=true
I think there's an error in the man page (which I'll work on getting fixed).
Can you try: (removing 'setoptions' from your command)


pcs constraint colocation set fs_ldap-clone sftp01-vip ldap1 sequential=true


Let me know if this does or doesn't work for you.

Thanks,
Chris
Post by Asgaroth
Error: Unable to update cib
Call cib_replace failed (-203): Update does not conform to the configured
schema
And then a dump of the current running info base.
Am I reading the man page incorrectly, or is this a bug I need to report?
Thanks
_______________________________________________
Pacemaker mailing list: Pacemaker at 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
Asgaroth
2014-02-25 09:01:34 UTC
Permalink
Post by Chris Feist
I think there's an error in the man page (which I'll work on getting fixed).
Thanks Chris.
Post by Chris Feist
Can you try: (removing 'setoptions' from your command)
pcs constraint colocation set fs_ldap-clone sftp01-vip ldap1
sequential=true
Post by Chris Feist
Let me know if this does or doesn't work for you.
I shall give this a go a little later today and get back to you
Asgaroth
2014-02-28 08:32:32 UTC
Permalink
Post by Asgaroth
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:

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
Chris Feist
2014-03-04 21:57:48 UTC
Permalink
Post by Chris Feist
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
# pcs constraint show --full
<snip>
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
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
http://pastebin.com/a13ZhyRq
Then I do "pcs resource move sftp01-vip bfievsftp02", which moves resources to
the node (except the associated ldap1 service)
http://pastebin.com/BSyTBEhX
http://pastebin.com/ng6m4C1Z
[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
Loading...