[ClusterLabs Developers] fencing-topology change in 1.1.14 (especially for pcs/crm authors)

Ken Gaillot kgaillot at redhat.com
Thu Sep 24 15:45:43 EDT 2015

Due to the parsing issues related to putting the attribute name and
value in the same field, the syntax has been tweaked as of upstream
commit 8940fca. To target by attribute, you would now specify
target-attribute with the attribute name and target-value with the
value, e.g.:

      <fencing-level id="rack-1-1" index="1"
          target-attribute="rack" target-value="1"
          devices="apc01,apc02" />

A reminder, if using the target-value to generate the id, be aware it
can have any characters, while ids are more restrictive. You might want
to sanitize the value, hash it, or use an increment instead.

FYI, the existing methods for specifying topology targets are
target="NODE_NAME" and target-pattern="NODE_NAME_REGEX". Previously,
these were implemented such that someone might have gotten away with
using a regex with target instead of target-pattern, but that won't work
with the new implementation.

On 09/08/2015 10:27 AM, Ken Gaillot wrote:
> As announced on users at clusterlabs.org[1], the next Pacemaker release
> will allow fencing topology targets specified by node attribute. This
> may affect tools that use Pacemaker's CLI interface or CIB XML,
> especially command shells like pcs and crm.
> To be compatible with the new syntax, such tools may need changes:
> * When validating user input for topology target, NAME=VALUE and
> NAME:VALUE are now acceptable in addition to node name or node name regex
> * Don't confuse NAME:VALUE with an IPv6 address, which must have more
> than one ':'
> * If using the target value to generate the XML ID, sanitize '=' or ':'
> (e.g. convert to '-' or whatever)
> * When displaying target values back to the user, don't assume that the
> value is a node name (e.g. label as "Target" instead of "Node", or query
> which nodes have the attribute, or something similar)
> * Make sure two equals don't cause problems for parsers (e.g.
> target=rack=01)
> [1] http://clusterlabs.org/pipermail/users/2015-September/001340.html

More information about the Developers mailing list