Skip to content

Commit c5b9d51

Browse files
authored
Merge pull request #931 from ja9fuchs/simplemount-on-rhel
sap_ha_pacemaker_cluster: enable Simple Mount on RHEL
2 parents b0f1a89 + 57f3d04 commit c5b9d51

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
---
3+
# Identify the version of the resource agents and disable
4+
# the use of "SimpleMount" if a minimum version is not satisfied.
5+
6+
- name: "SAP HA Prepare Pacemaker - Block for detection of 'SAPStartSrv' availability"
7+
block:
8+
9+
- name: "SAP HA Prepare Pacemaker - Check the resource agents package"
10+
ansible.builtin.shell:
11+
set -o pipefail && \
12+
dnf info resource-agents-sap | awk '/^Version/ {print $3}' | sort | tail -n1
13+
register: __sap_ha_pacemaker_cluster_sapstartsrv_check
14+
changed_when: false
15+
failed_when: false
16+
17+
- name: "SAP HA Prepare Pacemaker - Disable Simple Mount when min. package version is not available"
18+
ansible.builtin.set_fact:
19+
__sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: false
20+
when:
21+
- sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount | bool
22+
- __sap_ha_pacemaker_cluster_sapstartsrv_check.stdout is defined
23+
- "(__sap_ha_pacemaker_cluster_sapstartsrv_check.stdout) is version(__sap_ha_pacemaker_cluster_nwas_simple_mount_version, '<')"

roles/sap_ha_pacemaker_cluster/tasks/include_vars_nwas.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
when:
1414
- "(role_path + '/vars/' + include_item + '.yml') is file"
1515

16-
1716
# Private variables are assigned following logic:
1817
# 1. Use backwards compatible var if new var is empty
1918
# 2. Use user input if new var is not empty
@@ -391,3 +390,13 @@
391390
# TODO: Remove backwards compatibility to typo
392391
__sap_ha_pacemaker_cluster_storage_nfs_filesystem_type:
393392
"{{ sap_ha_pacemaker_cluster_storage_nfs_filesytem_type | d(sap_ha_pacemaker_cluster_storage_nfs_filesystem_type) }}"
393+
394+
# This must be run after the assignment of
395+
# __sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount
396+
# TODO: separate pre-steps from variable includes for NW and HANA
397+
- name: "SAP HA Prepare Pacemaker - Run NETWEAVER pre-steps"
398+
ansible.builtin.include_tasks:
399+
file: "{{ ansible_facts['os_family'] }}/pre_steps_nwas_ascs_ers.yml"
400+
when:
401+
- ansible_os_family == 'RedHat'
402+
- sap_ha_pacemaker_cluster_host_type | select('search', 'nwas') | length > 0

roles/sap_ha_pacemaker_cluster/vars/RedHat.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,5 @@ sap_ha_pacemaker_cluster_hana_hook_chksrv: true
158158

159159
# Central Services Cluster Simple Mount: Enabled as default
160160
# TODO: Enable when SAPStartSrv resource agents are available on Red Hat
161-
sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: false
161+
sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: true
162+
__sap_ha_pacemaker_cluster_nwas_simple_mount_version: 4.15.1

0 commit comments

Comments
 (0)