Skip to content

Commit

Permalink
sap_ha_pacemaker_cluster: (fix) hanacontroller clone name prefix per OS
Browse files Browse the repository at this point in the history
  • Loading branch information
ja9fuchs committed Dec 10, 2024
1 parent 5c34284 commit 4fd12ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion roles/sap_ha_pacemaker_cluster/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ sap_ha_pacemaker_cluster_hana_resource_name: '' # Default: rsc_SAPHa
sap_ha_pacemaker_cluster_hana_resource_clone_name: '' # Default: cln_SAPHana_<SID>_HDB<Instance Number>
sap_ha_pacemaker_cluster_hana_resource_clone_msl_name: '' # Default: msl_SAPHana_<SID>_HDB<Instance Number>
sap_ha_pacemaker_cluster_hanacontroller_resource_name: '' # Default: rsc_SAPHanaCon_<SID>_HDB<Instance Number>
sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name: '' # Default: cln_SAPHanaCon_<SID>_HDB<Instance Number>
sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name: '' # Default: <cln|mst>_SAPHanaCon_<SID>_HDB<Instance Number>
sap_ha_pacemaker_cluster_hana_topology_resource_name: '' # Default: rsc_SAPHanaTop_<SID>_HDB<Instance Number>
sap_ha_pacemaker_cluster_hana_topology_resource_clone_name: '' # Default: cln_SAPHanaTop_<SID>_HDB<Instance Number>
sap_ha_pacemaker_cluster_hana_filesystem_resource_name: '' # Default: rsc_SAPHanaFil_<SID>_HDB<Instance Number>
Expand Down
2 changes: 1 addition & 1 deletion roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ argument_specs:
- Customize the cluster resource name of the SAP HANA Controller.

sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name:
default: "cln_SAPHanaCon_<SID>_HDB<Instance Number>"
default: "<cln|mst>_SAPHanaCon_<SID>_HDB<Instance Number>"
description:
- Customize the cluster resource name of the SAP HANA Controller clone.

Expand Down
4 changes: 3 additions & 1 deletion roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
else sap_ha_pacemaker_cluster_hanacontroller_resource_name }}"

__sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name:
"{{ 'cln_SAPHanaCon_' ~ __sap_ha_pacemaker_cluster_hana_sid ~ '_HDB' ~ __sap_ha_pacemaker_cluster_hana_instance_nr
"{{ __hanacon_clone_prefix ~ '_SAPHanaCon_' ~ __sap_ha_pacemaker_cluster_hana_sid ~ '_HDB' ~ __sap_ha_pacemaker_cluster_hana_instance_nr
if sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name | string | length == 0
else sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name }}"

Expand All @@ -107,6 +107,8 @@
if sap_ha_pacemaker_cluster_hana_filesystem_resource_clone_name | string | length == 0
else sap_ha_pacemaker_cluster_hana_filesystem_resource_clone_name }}"

vars:
__hanacon_clone_prefix: "{{ 'mst' if os_family == 'Suse' else 'cln' }}"

- name: "SAP HA Prepare Pacemaker - Set cluster resource variables: Constraints (HANA)"
ansible.builtin.set_fact:
Expand Down
2 changes: 1 addition & 1 deletion roles/sap_ha_pacemaker_cluster/vars/hana_scaleup_perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ __sap_ha_pacemaker_cluster_hana_hook_dictionary:

# Recommended srhooks are set to true only if default dictionary is populated
__sap_ha_pacemaker_cluster_hana_hook_tkover:
"{{ true if
"{{ true if
(lookup('ansible.builtin.vars', __sap_ha_pacemaker_cluster_hana_hook_dictionary).tkover
is defined and (sap_ha_pacemaker_cluster_hana_hook_tkover | bool))
else false }}"
Expand Down

0 comments on commit 4fd12ee

Please sign in to comment.