Building a Nextcloudcluster a word about Stonith

image_pdfimage_print

Stonith is always a Pain…

The best Descriptio i ever read about Stonith was provided by Tim Serong.

He once wrote a Blog Post called Stonith Death Match. It’s a must read!

If you read Tim’s Article, you will get why i tell you..

:“ Never ever, configure a Production Cluster without a Stonith Device!“

You won’t face a Split brain Situation or Cluster Amnesia, or as one of my former Collagues sayd „the Life of Brian Syndrome“ “

The issue with Stonith is, there there several Agents and often it depends on your Environment which Agent do you have to use.
The other Pain is.. that it’s not very well documented, also there’s a lack of documentation about writing proper Stonith Agents.

Most Distributions ship a SSH Agent, but this is absolutely not a Production Agent, only useful for Test Cases.

Simply Ignore it, or better forget it’s existence!

If you’re using Vmware Vsphere there is a working Agent vor Vcenter/Esxi.

if you have to implement it stick to this wonderful Article, provided by Hastexo Technicians.

If you use HP Server,  up from GEN8 you can use HP ILO4 as your Fencing Device wiht the IMPI Agent.

Follow this Procedure…


echo „ipmi_si“ > /etc/modules-load.d/ipmi_si.conf
echo „ipmi_msghandler“ > /etc/modules-load.d/ipmi.conf
echo „ipmi_devintf“ > /etc/modules-load.d/ipmi_dev.conf

Be aware.. the Stonith Service has to be implement as a crossover Service.

The Stonith Device responsible for the clusternode0 should never ever be able to run on clusternode0, it has to be bound to clusternode1.

And vice versa for the Stonith Device responsible clusternode1
You got it?

crm configure primitive stonith_external_ipmi_res-stonith-clusternode0
stonith:external/ipmi \
params hostname=clusternode0 ipaddr=1.2.3.5 userid=MYILOSHOTTHENODEACCOUNT
passwd=12345passwd interface=lanplus \
op start interval=0 timeout=30 \
op stop interval=0 timeout=30 \
op monitor interval=1800 timeout=30 start-delay=0


crm configure primitive stonith_external_ipmi_res-stonith-clusternode1
stonith:external/ipmi \
params hostname=clusternode1 ipaddr=1.2.36.4 userid=MYILOSHOTTHENODEACCOUNT
passwd=12345passwd interface=lanplus \
op start interval=0 timeout=30 \
op stop interval=0 timeout=30 \
op monitor interval=1800 timeout=30 start-delay=0

Next the Location Constraints

crm configure location location_stonith_ipmi_sles12clusternode0-
stonith_external_ipmi_res-stonith- clusternode0 -inf:
clusternode0


crm configure location location_stonith_ipmi_clusternode1-
stonith_external_ipmi_res-stonith- clusternode1 -inf:
clusternode1

At this point you should have a working Stonith Solution.

Building a Nextcloudcluster a word about Stonith