[ClusterLabs] Puppet and Pacemaker

Gavin Main gavmain at gmail.com
Tue May 12 10:52:44 UTC 2015


Thanks Tomas. I am stuck with RHEL 6.5/6.6 for the moment, so it looks like I need to get creative. Using the id to specify the rule ID appears to help.

pcs constraint location ha_vip rule constraint-id=yourId score=-INFINITY id=location-ha_vip-1-rule pingd lt 1 or not_defined pingd

> On 11 May 2015, at 10:12, Tomas Jelinek <tojeline at redhat.com> wrote:
> 
> 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 <mailto:Users at clusterlabs.org>
>> http://clusterlabs.org/mailman/listinfo/users <http://clusterlabs.org/mailman/listinfo/users>
>> 
>> Project Home: http://www.clusterlabs.org <http://www.clusterlabs.org/>
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf <http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf>
>> Bugs: http://bugs.clusterlabs.org <http://bugs.clusterlabs.org/>
>> 
> 
> _______________________________________________
> Users mailing list: Users at clusterlabs.org <mailto:Users at clusterlabs.org>
> http://clusterlabs.org/mailman/listinfo/users <http://clusterlabs.org/mailman/listinfo/users>
> 
> Project Home: http://www.clusterlabs.org <http://www.clusterlabs.org/>
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf <http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf>
> Bugs: http://bugs.clusterlabs.org <http://bugs.clusterlabs.org/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20150512/1409098c/attachment.htm>


More information about the Users mailing list