[ClusterLabs] Puppet and Pacemaker

Gavin Main gavmain at gmail.com
Sun May 10 18:13:27 EDT 2015


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?

Cheers,
Gav



More information about the Users mailing list