Setting Cluster Parameters for Testing Purposes

Fencing is an important part of setting up a production-level HA cluster. For simplicity and testing purposes, it's disabled in this example. Fencing is covered in a later chapter. For more information see About Fencing Configuration (stonith).

WARNING:

Fencing must not be disabled in a production cluster.

Fencing is only disabled in test clusters so that resources can be started (for initial testing) without completing setup and configuration of fencing devices.

To set parameters for the test cluster:

  1. Disable the fencing feature by running the following command:

    sudo pcs property set stonith-enabled=false
  2. Optionally, configure the cluster to ignore the quorum state by running the following command:

    sudo pcs property set no-quorum-policy=ignore

    Because this example uses a two-node cluster, disabling the no-quorum policy makes the most sense, as quorum technically requires a minimum of three nodes to be a viable configuration. Quorum is only achieved when more than half of the nodes agree on the status of the cluster.

    In the current release of Corosync, this issue is treated specially for two-node clusters, where the quorum value is artificially set to 1 so that the primary node is always considered in quorum. In the case where a network outage results in both nodes going offline for a period, the nodes race to fence each other and the first to succeed wins quorum. The fencing agent can usually be configured to give one node priority so that it is more likely to win quorum if this is preferred.