How to set stonith-enabled to true in a Pacemaker cluster
Environment
- Red Hat Enterprise Linux 6 (with the High Availability or Resilient Storage Add on)
- Red Hat Enterprise Linux 7 (with the High Availability or Resilient Storage Add on)
- Red Hat Enterprise Linux 8 (with the High Availability or Resilient Storage Add on)
- Red Hat Enterprise Linux 9 (with the High Availability or Resilient Storage Add on)
pacemaker
Issue
- How to set stonith-enabled to true in a Pacemaker cluster
stonith-enabledis set to false in the cluster configuration- What is the impact of
stonith-enabledcluster setting?
Resolution
-
Set
stonith-enabledto true.# pcs property set stonith-enabled=true
Root Cause
-
In order for clustered environments to receive support for cluster type issues, the value for
stonith-enabledmust be set totruein order for fencing to be functional. This is a support requirement, as failing to have a working fencing configuration will result in unexpected behaviors in the cluster.- Important Note: This is especially important to maintain
stonith-enabled=truein two node clusters, as these represent a special case where split-brains are guaranteed with stonith disabled. This is due to the special two_node option which guarantees we maintain quorum ( and thus split-brain ) in a network split scenario.
- Important Note: This is especially important to maintain
-
When setting
stonith-enabledto true, one must also configure stonith devices. This is required for stonith to function in a predictable fashion. Settingstonith-enabledto true and not having stonith devices configured would not allow resources to start/recover correctly after a cluster node is rebooted. -
Additional resources on fencing can be found below:
- Importance of Fencing in a Red Hat High Availability Cluster
- Available Fencing Types and Fencing Agents for a Red Hat High-Availability Cluster
- How to configure fence_ipmilan in a Red Hat High Availability Cluster
- How to test fence devices in a Red Hat High Availability Cluster
- How to troubleshoot fence_ipmilan issues
-
For Openstack based environments refer to Openstack Director Installation and Usage guides under the "Fencing the Controller Nodes" section.
Diagnostic Steps
-
Check the output of
pcs cluster cibto check the status of the stonith bootstrap options. If no output is returned, stonith-enabled is set to true by default, event when not specifically listed in the cib:<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/>
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.