Raoul Scarazzini 8fc618c3d3 Fix STONITH script creation for Liberty/Mitaka
Without using positional arguments inside the connection function in the
template for the stonith script creation the backward compatibility is
broken. This commit fix this by using again positional arguments and it
will fix Liberty/OSP8 and Mitaka/OSP9 deployments.

Change-Id: I49920dd23e372e034706d49a15d6f91a0a248bd8
2018-03-29 10:40:01 -04:00
..
2017-08-23 08:48:13 -04:00

stonith-config

This role acts on an already deployed tripleo environment, setting up STONITH (Shoot The Other Node In The Head) inside the Pacemaker configuration for all the hosts that are part of the overcloud.

Requirements

The TripleO environment must be prepared as described here.

STONITH

STONITH is the way a Pacemaker clusters use to be certain that a node is powered off. STONITH is the only way to use a shared storage environment without worrying about concurrent writes on disks. Inside TripleO environments STONITH is a requisite also for activating features like Instance HA because, before moving any machine, the system need to be sure that the "move from" machine is off. STONITH configuration relies on the instackenv.json file, used by TripleO also to configure Ironic and all the provision stuff. Basically this role enables STONITH on the Pacemaker cluster and takes all the information from the mentioned file, creating a STONITH resource for each host on the overcloud. After running this playbook the cluster configuration will have this properties:

$ sudo pcs property
Cluster Properties:
 cluster-infrastructure: corosync
 cluster-name: tripleo_cluster
 ...
 ...
 **stonith-enabled: true**

And something like this, depending on how many nodes are there in the overcloud:

sudo pcs stonith
 ipmilan-overcloud-compute-0    (stonith:fence_ipmilan):        Started overcloud-controller-1
 ipmilan-overcloud-controller-2 (stonith:fence_ipmilan):        Started overcloud-controller-0
 ipmilan-overcloud-controller-0 (stonith:fence_ipmilan):        Started overcloud-controller-0
 ipmilan-overcloud-controller-1 (stonith:fence_ipmilan):        Started overcloud-controller-1
 ipmilan-overcloud-compute-1    (stonith:fence_ipmilan):        Started overcloud-controller-1

Having all this in place is a requirement for a reliable HA solution and for configuring special OpenStack features like Instance HA.

Note: by default this role configures STONITH for the controllers nodes, but it is possible to configure all the nodes or to limitate it just for computes, by setting the stonith_devices variable, which by default is set to "controllers", but can also be "all" or "computes".

Limitations

The only kind of STONITH devices supported are for the moment IPMI.

Examples on how to invoke the playbook via ansible

This command line will install the STONITH devices for the controller nodes:

ansible-playbook /home/stack/tripleo-quickstart-utils/playbooks/overcloud-stonith-config.yml -e release="rhos-10"

If a user wants to install the STONITH devices for all the nodes:

ansible-playbook /home/stack/tripleo-quickstart-utils/playbooks/overcloud-stonith-config.yml -e release="rhos-10" -e stonith_devices="all"

To uninstall the STONITH devices for the controllers:

ansible-playbook /home/stack/tripleo-quickstart-utils/playbooks/overcloud-stonith-config.yml -e release="rhos-10" -e stonith_action="uninstall"

To uninstall the STONITH devices just for the computes:

ansible-playbook /home/stack/tripleo-quickstart-utils/playbooks/overcloud-stonith-config.yml -e release="rhos-10" -e stonith_action="uninstall" -e stonith_devices="computes"

The STONITH role supports also "none" as a valid value for stonith_devices which can become useful when configuring instance HA in an environment already configured with STONITH for both controllers and computes.

License

GPL

Author Information

Raoul Scarazzini rasca@redhat.com