[ClusterLabs] Puppet and Pacemaker

Tomas Jelinek tojeline at redhat.com
Mon May 11 09:12:32 UTC 2015


Dne 11.5.2015 v 00:13 Gavin Main napsal(a):
> I am making an effort to extend the support for Pacemaker in the Puppetlabs corosync module. I have already made my first few commits (https://github.com/puppetlabs/puppetlabs-corosync/compare/master...gavmain:master) but am coming up against a bit of a brick wall when it comes to managing location-based resource constraints.
>
> My problem is that because I can’t control the value of the rsc_location_id, which makes it difficult to track of the constraint when the puppet provider executes something like:
>
> pcs constraint location ha_vip rule score=-INFINITY pingd lt 1 or not_defined pingd
>
>   # cibadmin --query --scope constraints
> <constraints>
>    <rsc_location id="location-ha_vip" rsc="ha_vip">
>      <rule boolean-op="or" id="location-ha_vip-rule" score="-INFINITY">
>        <expression attribute="pingd" id="location-ha_vip-rule-expr-1" operation="lt" value="1"/>
>        <expression attribute="pingd" id="location-ha_vip-rule-expr-2" operation="not_defined"/>
>      </rule>
>    </rsc_location>
>    <rsc_location id="location-ha_vip-1" rsc="ha_vip">
>      <rule boolean-op="or" id="location-ha_vip-1-rule" score="-INFINITY">
>        <expression attribute="ping" id="location-ha_vip-1-rule-expr-1" operation="lt" value="1"/>
>        <expression attribute="pingd" id="location-ha_vip-1-rule-expr-2" operation="not_defined"/>
>      </rule>
>    </rsc_location>
> </constraints>
>
>
> Is there a way I can force the rsc_location_id to be a value of my choosing?

Gavin,

Using pcs 0.9.132 or newer it is possible to specify an id of created 
constraints.  In your case:
pcs constraint location ha_vip rule constraint-id=yourId score=-INFINITY 
pingd lt 1 or not_defined pingd

Regards,
Tomas

>
> Cheers,
> Gav
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>




More information about the Users mailing list