[ClusterLabs] Coming in 1.1.14: Fencing topology based on node attribute

Kristoffer Grönlund kgronlund at suse.com
Wed Sep 9 16:33:36 UTC 2015


Andrew Beekhof <andrew at beekhof.net> writes:

>
> word of warning, i’m in the process of changing it to avoid overloading the ‘target’ attribute and exposing quoting issues stemming from people’s use of ‘='
>
>    https://github.com/beekhof/pacemaker/commit/ea4fc1c
>

Thanks, I'll fix it.

Cheers,
Kristoffer

>
>
>> so this will work fine in the next
>> version of crmsh.
>> 
>> Examples of crmsh syntax below:
>> 
>>> Previously, if node1 was in rack #1, you'd have to register a fencing
>>> topology by its name, which at the XML level would look like:
>>> 
>>>   <fencing-topology>
>>>      <fencing-level id="node1-1" index="1" target="node1"
>>>          devices="apc01,apc02"/>
>>>   </fencing-topology>
>>> 
>> 
>> crm cfg fencing-topology node1: apc01,apc02
>> 
>>> 
>>> With the new feature, you could instead register a topology for all
>>> hosts that have a node attribute "rack" whose value is "1":
>>> 
>>>   <fencing-topology>
>>>      <fencing-level id="rack-1-1" index="1" target="rack=1"
>>>          devices="apc01,apc02"/>
>>>   </fencing-topology>
>>> 
>> 
>> crm cfg fencing-topology rack=1: apc01,apc02
>> 
>>> 
>>> You would assign that attribute to all nodes in that rack, e.g.:
>>> 
>>>   crm_attribute --type nodes --node node1 --name rack --update 1
>>> 
>> 
>> crm node attr node1 set rack 1
>> 
>>> 
>>> The syntax accepts either '=' or ':' as the separator for the name/value
>>> pair, so target="rack:1" would work in the XML as well.
>> 
>> crm cfg fencing-topology rack:1: apc01,apc02
>> 
>> (admittedly perhaps not as clean as using '=', but it works)
>> 
>> Cheers,
>> Kristoffer
>> 
>>> -- 
>>> Ken Gaillot <kgaillot at redhat.com>
>>> 
>>> _______________________________________________
>>> 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
>>> 
>> 
>> -- 
>> // Kristoffer Grönlund
>> // kgronlund at suse.com
>> 
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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

-- 
// Kristoffer Grönlund
// kgronlund at suse.com




More information about the Users mailing list