Skip to content

Commit 6384d65

Browse files
authored
Merge pull request sap-linuxlab#1151 from marcelmamula/aws-fence-16
sap_ha_pacemaker_cluster: Add fence_aws for SLES 16 and remove Tech Debt
2 parents 829116c + d09076d commit 6384d65

10 files changed

Lines changed: 823 additions & 714 deletions

File tree

roles/sap_ha_pacemaker_cluster/DEPRECATED_VARIABLES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ All deprecated variables offer time limited backwards compatibility that will be
4646
| ~~sap_ha_pacemaker_cluster_healthcheck_nwas_abap_ascs_id~~<br>sap_ha_pacemaker_cluster_healthcheck_nwas_ascs_id | :heavy_check_mark: | Removal of `_abap_` |
4747
| ~~sap_ha_pacemaker_cluster_healthcheck_nwas_abap_ers_id~~<br>sap_ha_pacemaker_cluster_healthcheck_nwas_ers_id | :heavy_check_mark: | Removal of `_abap_` |
4848
| ~~sap_ha_pacemaker_cluster_storage_nfs_filesytem_type~~<br>sap_ha_pacemaker_cluster_storage_nfs_filesystem_type | :heavy_check_mark: | Typo |
49+
| ~~sap_ha_pacemaker_cluster_fence_agent_minimal_packages~~ | :x: | Replaced with `sap_ha_pacemaker_cluster_fence_agent_packages` |
50+
| ~~sap_ha_pacemaker_cluster_stonith_custom.name~~ | :x: | Replaced with `sap_ha_pacemaker_cluster_stonith_custom.id` |
51+
| ~~sap_ha_pacemaker_cluster_stonith_custom.options~~ | :x: | Removed in favor of `instance_attrs` and `meta_attrs` |
4952

5053

5154
## Status explanation:

roles/sap_ha_pacemaker_cluster/README.md

Lines changed: 311 additions & 273 deletions
Large diffs are not rendered by default.

roles/sap_ha_pacemaker_cluster/defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ sap_ha_pacemaker_cluster_vip_client_interface: ''
6565
# pcmk_host_list: ""
6666

6767
## The variable 'sap_ha_pacemaker_cluster_cluster_properties' is used to configure cluster properties (e.g. cib-bootstrap-options).
68-
# NOTE: Default values are defined by Operating System and Platforms, if the variable is not defined.
68+
# NOTE 1: Default values are defined by Operating System and Platforms, if the variable is not defined.
69+
# NOTE 2: Configuring wrong properties or disabling fencing can have adverse effects on cluster stability and data integrity.
6970
# Simpler definition format here which gets transformed into the 'ha_cluster' LSR native 'ha_cluster_cluster_properties' parameter.
7071
# sap_ha_pacemaker_cluster_cluster_properties:
7172
# stonith-enabled: true

roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ argument_specs:
99

1010
main:
1111
short_description: SAP HA automated cluster setup requirements
12+
# This is used to populate beginning of the Role Variables section in README.md
13+
description: |
14+
Minimum required parameters for all clusters:
15+
- [sap_ha_pacemaker_cluster_hacluster_user_password](#sap_ha_pacemaker_cluster_hacluster_user_password)
16+
17+
Additional minimum requirements depend on the type of cluster setup and on the target platform.
1218
options:
1319

1420
# Take this template and copy it to the desired place.
@@ -170,8 +176,7 @@ argument_specs:
170176
description:
171177
- Parameter `id` is required.
172178
- Name that will be used as the resource ID (name).
173-
# TODO: Enable to remove Tech debt after name and options are removed!
174-
# required: true
179+
required: true
175180
agent:
176181
type: str
177182
description:
@@ -199,16 +204,6 @@ argument_specs:
199204
type: list
200205
description:
201206
- Defines meta attributes as list of name/value pairs.
202-
# TODO: Tech Debt: Remove name and options in next release
203-
name:
204-
type: str
205-
description:
206-
- WARNING! This option will be removed in future release.
207-
# TODO: Tech Debt: Remove name and options in next release
208-
options:
209-
type: dict
210-
description:
211-
- WARNING! This option will be removed in future release.
212207

213208
example:
214209
sap_ha_pacemaker_cluster_stonith_custom:
@@ -298,11 +293,9 @@ argument_specs:
298293
sap_ha_pacemaker_cluster_cluster_properties:
299294
type: dict
300295
description:
301-
- Standard pacemaker cluster properties are configured with recommended settings for
302-
cluster node fencing.
296+
- Optional configuration of cluster properties (cib-bootstrap-options).
297+
- Default values are applied by Operating System and Platform, if the variable is not defined.
303298
- When no STONITH resource is defined, STONITH will be disabled and a warning displayed.
304-
- Default values are predefined by OS and Platform if the variable is not defined.
305-
- Some mandatory properties are appended, if not defined.
306299

307300
example:
308301
sap_ha_pacemaker_cluster_cluster_properties:
@@ -380,9 +373,7 @@ argument_specs:
380373
type: list
381374
description:
382375
- Additional fence agent packages to be installed.
383-
- "This is automatically combined with default packages in:"
384-
- "`__sap_ha_pacemaker_cluster_fence_agent_packages_minimal`"
385-
- "`__sap_ha_pacemaker_cluster_fence_agent_packages_platform`"
376+
- "This is automatically combined with default OS and Platform specific packages."
386377

387378
sap_ha_pacemaker_cluster_zypper_patterns:
388379
type: list

roles/sap_ha_pacemaker_cluster/tasks/construct_vars_common.yml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -70,39 +70,26 @@
7070

7171
# __sap_ha_pacemaker_cluster_fence_agent_packages loaded from ha_cluster is not included,
7272
# because it would still not be used due to precedence.
73-
# TODO: Remove Tech debt conditionals in future for deprecated var 'sap_ha_pacemaker_cluster_fence_agent_minimal_packages'
7473
- name: "SAP HA Prepare Pacemaker - Combine fence agent packages lists"
7574
ansible.builtin.set_fact:
7675
__sap_ha_pacemaker_cluster_fence_agent_packages: "{{
77-
(__sap_ha_pacemaker_cluster_fence_agent_packages_minimal_combined
76+
(__sap_ha_pacemaker_cluster_fence_agent_packages_minimal
7877
+ __sap_ha_pacemaker_cluster_fence_agent_packages_platform
7978
+ sap_ha_pacemaker_cluster_fence_agent_packages)
8079
| unique }}"
81-
vars:
82-
# Tech debt for sap_ha_pacemaker_cluster_fence_agent_minimal_packages
83-
__sap_ha_pacemaker_cluster_fence_agent_packages_minimal_combined:
84-
"{{ __sap_ha_pacemaker_cluster_fence_agent_packages_minimal
85-
+ sap_ha_pacemaker_cluster_fence_agent_minimal_packages
86-
if (sap_ha_pacemaker_cluster_fence_agent_minimal_packages is defined
87-
and sap_ha_pacemaker_cluster_fence_agent_minimal_packages | length > 0
88-
and sap_ha_pacemaker_cluster_fence_agent_minimal_packages is iterable)
89-
else __sap_ha_pacemaker_cluster_fence_agent_packages_minimal }}"
90-
9180

9281
# Prepare cluster properties variable with either:
93-
# - User provided 'sap_ha_pacemaker_cluster_cluster_properties' if defined and not empty.
82+
# - User provided 'sap_ha_pacemaker_cluster_cluster_properties' if defined.
9483
# - Platform specific defaults, if defined.
9584
# - OS specific defaults.
96-
# If the variable 'ha_cluster_properties' is defined, it will append only missing keys.
85+
# Combine prioritizes platform specific over OS specific.
9786
- name: "SAP HA Prepare Pacemaker - Prepare cluster properties variable"
9887
ansible.builtin.set_fact:
9988
__sap_ha_pacemaker_cluster_cluster_properties:
10089
"{{ sap_ha_pacemaker_cluster_cluster_properties
101-
if sap_ha_pacemaker_cluster_cluster_properties is defined and sap_ha_pacemaker_cluster_cluster_properties | length > 0
102-
else (__sap_ha_pacemaker_cluster_cluster_properties_platform
103-
if __sap_ha_pacemaker_cluster_cluster_properties_platform is defined
104-
else __sap_ha_pacemaker_cluster_cluster_properties_default) }}"
105-
90+
if sap_ha_pacemaker_cluster_cluster_properties is defined
91+
else __sap_ha_pacemaker_cluster_cluster_properties_default | d({})
92+
| combine(__sap_ha_pacemaker_cluster_cluster_properties_platform | d({})) }}"
10693

10794
# Prepare corosync totem variable with either:
10895
# - User provided 'sap_ha_pacemaker_cluster_corosync_totem' if present

0 commit comments

Comments
 (0)