This role installs pacemaker cluster packages and configures the cluster and SAP cluster resources in a new pacemaker cluster.
The pacemaker installation and cluster setup is done through the ha_cluster
Linux System Role.
Ansible role sap_ha_pacemaker_cluster
is acting as a wrapper and takes care of the SAP environment parameter definitions, platform specific variables and additional steps to complete the SAP HA configuration in the pacemaker cluster.
:warning: Do not execute this role against already configured cluster nodes,
:warning: unless you know what you are doing and have prepared the role input variables accordingly!
Target Systems:
sap_hana_*
Ansible roles in this repositoryAnsible Control System:
rhel-system-roles-1.13.0-1
or laterrhel_system_roles 1.12.1
or laterfedora.linux_system_roles:1.13.0
or laterAll of the following functionality is provided as Technology Preview.
:warning: Platforms not explicitly listed may not work as expected.
Platform | Usability |
---|---|
:heavy_check_mark: physical server | expected to work with any fencing method that is supported by the ha_cluster Linux System Role |
:heavy_check_mark: OVirt VM | tested and working |
:heavy_check_mark: AWS EC2 VS | platform detection and awscli setup included, tested and expected to work |
IBM Cloud VS | platform detection included, tested and working (unsupported at this point in time) |
Minimum required parameters:
On cloud platforms additional parameters are required:
sap_ha_pacemaker_cluster_aws_*
variablessap_ha_pacemaker_cluster_vip_update_rt
sap_ha_pacemaker_cluster_ibmcloud_*
variablesdict
Optional host_vars parameter - if defined it must be set for each node.
Dictionary that can contain various node options for the pacemaker cluster configuration.
Supported options can be reviewed in the ha_cluster
Linux System Role [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md].
Example:
ha_cluster:
corosync_addresses:
- 192.168.1.10
- 192.168.2.10
node_name: nodeA
str
my-cluster
The name of the pacemaker cluster.
str
The password of the hacluster
user which is created during pacemaker installation.
str
AWS access key to allow control of instances (for example for fencing operations).
Required for cluster nodes setup on Amazon cloud.
str
The AWS region in which the instances to be used for the cluster setup are located.
Required for cluster nodes setup on Amazon cloud.
str
AWS secret key, paired with the access key for instance control.
Required for cluster nodes setup on Amazon cloud.
dict
See example
Standard pacemaker cluster properties are configured with recommended settings for cluster node fencing.
Example:
sap_ha_pacemaker_cluster_cluster_properties:
concurrent-fencing: true
stonith-enabled: true
stonith-timeout: 900
str
<cluster-name>_resource_config.yml
The pacemaker cluster resource configuration optionally created by this role will be saved in a Yaml file in the current working directory.
Requires sap_ha_pacemaker_cluster_create_config_varfile
to be enabled for generating the output file.
Specify a path/filename to save the file in a custom location.
The file can be used as input vars file for an Ansible playbook running the ‘ha_cluster’ Linux System Role.
bool
False
When enabled, all cluster configuration parameters this role constructs for executing the ‘ha_cluster’ Linux System role will be written into a file in Yaml format.
This allows using the output file later as input file for additional custom steps using the ‘ha_cluster’ role and covering the resource configuration in a cluster that was set up using this ‘sap_ha_pacemaker_cluster’ role.
When enabled this parameters file is also created when the playbook is run in check_mode (--check
) and can be used to review the configuration parameters without executing actual changes on the target nodes.
WARNING! This report may include sensitive details like secrets required for certain cluster resources!
dict
STONITH resource common parameters that apply to most fencing agents.
These options are applied to fencing resources this role uses automatically for pre-defined platforms (like AWS EC2 VS, IBM Cloud VS).
The listed options are set by default.
Additional options can be added by defining this parameter in dictionary format and adding the defaults plus any valid stonith resource key-value pair.
4
400
240
Example:
sap_ha_pacemaker_cluster_fence_options:
pcmk_reboot_retries: 4
pcmk_reboot_timeout: 400
power_timeout: 240
bool
True
Parameter for the ‘SAPHana’ cluster resource.
Define if a former primary should be re-registered automatically as secondary.
int
900
Parameter for the ‘SAPHana’ cluster resource.
Time difference needed between to primary time stamps, if a dual-primary situation occurs.
If the time difference is less than the time gap, then the cluster holds one or both instances in a “WAITING” status.
This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
bool
True
Parameter for the ‘SAPHana’ cluster resource.
Set to “false” if the cluster should first attempt to restart the instance on the same node.
When set to “true” (default) a failover to secondary will be initiated on resource failure.
str
SAPHana_<SID>_<Instance Number>
Customize the cluster resource name of the SAP HANA DB resource.
str
SAPHanaTopology_<SID>_<Instance Number>
Customize the cluster resource name of the SAP HANA Topology resource.
str
The API key is required to allow control of instances (for example for fencing operations).
Required for cluster nodes setup in IBM Cloud.
str
The cloud region key in which the instances are running.
Required for cluster nodes setup in IBM Cloud.
str
none
The type of SAP HANA site replication across multiple hosts.
Not yet supported
dict
See example
Set default parameters that will be valid for all pacemaker resources.
Example:
sap_ha_pacemaker_cluster_resource_defaults:
migration-threshold: 5000
resource-stickiness: 1000
str
scaleup
The SAP landscape to be installed.
Currently only scale-up is supported
str
eth0
OS device name of the network interface to use for the Virtual IP configuration.
This is used for VIP agents that require an interface name, for example in cloud platform environments.
str
vip_<SID>_<Instance Number>
Customize the name of the resource managing the Virtual IP.
list
List one more routing table IDs for managing Virtual IP failover through routing table changes.
Required for VIP configuration in AWS EC2 environments.
list
List of cluster nodes and associated attributes to describe the target SAP HA environment.
This is required for the HANA System Replication configuration.
Example:
sap_hana_cluster_nodes:
- hana_site: DC01
node_ip: 192.168.5.1
node_name: nodeA
node_role: primary
- hana_site: DC02
node_ip: 192.168.5.2
node_name: nodeB
node_role: secondary
str
The instance number of the SAP HANA database which is role will configure in the cluster.
str
The SAP System ID of the instance that will be configured in the cluster.
The SAP SID must follow SAP specifications - see SAP Note 1979280.
dict
One floating IP is required for SAP HANA DB connection by clients.
This main VIP will always run on the promoted HANA node and be moved with it during a failover.
Example:
sap_hana_vip:
primary: 192.168.10.100