[Pacemaker] collocating a set of resources with crmsh

Kristoffer Grönlund kgronlund at suse.com
Mon Mar 24 21:34:51 UTC 2014


On Mon, 24 Mar 2014 20:01:25 +0100
Alexandre <alxgomz at gmail.com> wrote:

> Hi,
> 
> I am configuring a cluster on nodes that doesn't have pcs installed
> (pacemaker 1.1.7 with crmsh).
> I would like to configure collocated sets of resources (as show
> here:http://clusterlabs.org/doc/en-US/Pacemaker/1.1-plugin/html-single/Pacemaker_Explained/#s-resource-sets-collocation)
> in that cluster but can't find the proper way to do it with crm.
> I have tried the command bellow but it just failed:
> 
> sudo crm configure xml "<constraints><rsc_colocation id="coloc-1"
> score="INFINITY"/><resource_set id="collocated-set-example"
> sequential="true"><resource_ref id="pri_apache2"/><resource_ref
> id="pri_iscsi"/></resource_set></rsc_colocation></constraints>"
> 
> ERROR: not well-formed (invalid token): line 1, column 32
> 
> What is the way to proceed with crm?

Well, that statement doesn't work because it doesn't parse in bash (you
are quoting a string containing quotes). This should work:

sudo crm configure colocation coloc-1 inf: \
    \( pri_apache2 pri_iscsi sequential=true \)

The parenthesis need to be quoted so bash doesn't eat them.

> 
> Regards.
> 
> _______________________________________________
> 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
> 



-- 
// Kristoffer Grönlund
// kgronlund at suse.com




More information about the Pacemaker mailing list