[Pacemaker] Proposed new stonith topology syntax

Andrew Beekhof andrew at beekhof.net
Tue Jan 3 01:19:14 EST 2012


Does anyone have an opinion on the following schema and example?
I'm not a huge fan of the index field, but nor am I of making it
sensitive to order (like groups).

Please keep in mind that the new topology section is optional and
would only be defined if:
 - you wanted to specify the order in which multiple devices were tried, or
 - if multiple devices need to be triggered for the node to be
considered fenced.

Most people will /NOT/ need to add this section to their configuration.

-- Andrew

<fencing-topology>
  <!-- pcmk-0 requires the devices named disk + network to complete -->
  <fencing-rule id="f-p0" node="pcmk-0">
    <device id-ref="disk"/>
    <device id-ref="network"/>
  </fencing-rule>

  <!-- pcmk-1 needs either the poison-pill or power device to complete
successfully -->
  <fencing-rule id="f-p1.1" node="pcmk-1" index="1" device="poison-pill"/>
  <fencing-rule id="f-p1.2" node="pcmk-1" index="2" device="power">

  <!-- pcmk-1 needs either the disk and network devices to complete
successfully OR the device named power -->
  <fencing-rule id="f-p2.1" node="pcmk-2" index="1">
    <device id-ref="disk"/>
    <device id-ref="network"/>
  </fencing-rule>
  <fencing-rule id="f-p2.2" node="pcmk-2" index="2" device="power"/>

</fencing-topology>

Conforming to:

  <define name="element-stonith">
    <element name="fencing-topology">
      <zeroOrMore>
	<ref name="element-fencing"/>
      </zeroOrMore>
    </element>
  </define>

  <define name="element-fencing">
    <element name="fencing-rule">
      <attribute name="id"><data type="ID"/></attribute>
      <attribute name="node"><text/></attribute>
      <attribute name="index"><text/></attribute>
      <choice>
	<attribute name="device"><text/></attribute>	
	<zeroOrMore>
 	  <element name="device">
	    <attribute name="id-ref"><data type="IDREF"/></attribute>
	  </element>
	</zeroOrMore>
      </choice>
    </element>
  </define>

</grammar>




More information about the Pacemaker mailing list