Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sap_ha_pacemaker_cluster: enable Simple Mount on RHEL #931

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-License-Identifier: Apache-2.0
---
# Identify the version of the resource agents and disable
# the use of "SimpleMount" if a minimum version is not satisfied.

- name: "SAP HA Prepare Pacemaker - Block for detection of 'SAPStartSrv' availability"
block:

- name: "SAP HA Prepare Pacemaker - Check the resource agents package"
ansible.builtin.shell:
set -o pipefail && \
dnf info resource-agents-sap | awk '/^Version/ {print $3}' | sort | tail -n1
register: __sap_ha_pacemaker_cluster_sapstartsrv_check
changed_when: false
failed_when: false

- name: "SAP HA Prepare Pacemaker - Disable Simple Mount when min. package version is not available"
ansible.builtin.set_fact:
__sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: false
when:
- sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount | bool
- __sap_ha_pacemaker_cluster_sapstartsrv_check.stdout is defined
- "(__sap_ha_pacemaker_cluster_sapstartsrv_check.stdout) is version(__sap_ha_pacemaker_cluster_nwas_simple_mount_version, '<')"
11 changes: 10 additions & 1 deletion roles/sap_ha_pacemaker_cluster/tasks/include_vars_nwas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
when:
- "(role_path + '/vars/' + include_item + '.yml') is file"


# Private variables are assigned following logic:
# 1. Use backwards compatible var if new var is empty
# 2. Use user input if new var is not empty
Expand Down Expand Up @@ -391,3 +390,13 @@
# TODO: Remove backwards compatibility to typo
__sap_ha_pacemaker_cluster_storage_nfs_filesystem_type:
"{{ sap_ha_pacemaker_cluster_storage_nfs_filesytem_type | d(sap_ha_pacemaker_cluster_storage_nfs_filesystem_type) }}"

# This must be run after the assignment of
# __sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount
# TODO: separate pre-steps from variable includes for NW and HANA
- name: "SAP HA Prepare Pacemaker - Run NETWEAVER pre-steps"
ansible.builtin.include_tasks:
file: "{{ ansible_facts['os_family'] }}/pre_steps_nwas_ascs_ers.yml"
when:
- ansible_os_family == 'RedHat'
- sap_ha_pacemaker_cluster_host_type | select('search', 'nwas') | length > 0
3 changes: 2 additions & 1 deletion roles/sap_ha_pacemaker_cluster/vars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,5 @@ sap_ha_pacemaker_cluster_hana_hook_chksrv: true

# Central Services Cluster Simple Mount: Enabled as default
# TODO: Enable when SAPStartSrv resource agents are available on Red Hat
sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: false
sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: true
__sap_ha_pacemaker_cluster_nwas_simple_mount_version: 4.15.1
Loading