[ClusterLabs] no clone for pcs-based cluster fencing?

Ken Gaillot kgaillot at redhat.com
Mon Mar 21 10:22:40 EDT 2016


On 03/20/2016 06:20 PM, Devin Reade wrote:
> I'm looking at a new pcs-style two node cluster running on CentOS 7
> (pacemaker 1.1.13, corosync 2.3.4) and crm_mon shows this line
> for my fencing resource, that is the resource running on only one of
> the two nodes:
> 
>    fence_cl2 (stonith:fence_apc_snmp):    Started nodeB
> 
> On an older CentOS 5 cluster (pacemaker 1.0.12, corosync 1.2.7),
> crm_mon shows as the comparable line the following, that is the
> fencing agent cloned across both nodes:
> 
>    Clone Set: pdu-fence
>        Started: [ node1 node2 ]
> 
> With the new pcs-based clusters, are the (APC SNMP) fencing agents not
> supposed to be cloned anymore, or do I just have things misconfigured?

It's actually newer pacemaker versions rather than pcs itself. Fence
agents do not need to be cloned, or even running -- as long as they're
configured and enabled, any node can use the resource. The node that's
"running" the fence device will be the one that monitors it, and as a
result it will be preferred to execute the fencing if possible.

For fence_apc_snmp in particular, you want to use pcmk_host_map instead
of pcmk_host_list/pcmk_host_check, to map node names to APC ports. For
example, pcmk_host_map="nodeA:1;nodeB:2" if those are the relevant APC
ports.

> Looking at the pcs man page, it looks like cloning a fencing agent isn't
> supported.
> 
> I was pretty sure I tested fencing on both nodes when I first configured
> the cluster, but I don't have a record of where the fencing agent was
> running at the time.  I was using the RHEL7 cluster configuration guide
> and I don't seem to see anything in there talking about cloning the fencing
> agent, so I'm wondering if it's no longer a recommended/required procedure.
> 
> New cluster config:
> 
>  Stonith Devices:
>    Resource: fence_cl2 (class=stonith type=fence_apc_snmp)
>     Attributes: pcmk_host_list=nodeA,nodeB ipaddr=192.168.1.200
> community=somepass pcmk_host_check=static-list
>     Operations: monitor interval=60s (fence_cl2-monitor-interval-60s)
> 
> Old cluster config:
> 
>   primitive st-pdu stonith:apcmastersnmp \
>        params ipaddr="192.168.1.200" community="somepass" port="161" \
>        op start interval="0" timeout="60s" \
>        op stop interval="0" timeout="15s" \
>        op monitor interval="3600" timeout="60s"
>   clone pdu-fence st-pdu
> 
> 
> Devin





More information about the Users mailing list