-
Notifications
You must be signed in to change notification settings - Fork 60
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: Allow to append manual cluster config to the generated config #922
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ It is recommended to execute this role together with other roles in this collect | |
|
||
#### SAP Netweaver cluster | ||
1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | ||
2. [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | ||
2. [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | ||
3. [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | ||
4. [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | ||
5. *`sap_ha_pacemaker_cluster`* | ||
|
@@ -1167,4 +1167,20 @@ Name of the NetWeaver SCS resource group.<br> | |
|
||
Name of the Virtual IP resource for NetWeaver Central Services (SCS).<br> | ||
|
||
### sap_ha_pacemaker_cluster_constraints_colocation_append <br>sap_ha_cluster_constraints_location_append <br>sap_ha_pacemaker_cluster_constraints_order_append <br>sap_ha_cluster_resource_clones_append <br>sap_ha_cluster_resource_primitives_append | ||
|
||
- _Type:_ `list` | ||
|
||
This role generally respects pre-defined ha_cluster* variables and tries to merge the configuration it generates with the content of the pre-defined variables. <br> | ||
However, in some cases the order of resources is important. The above variables allow to append a specific cluster configuration AFTER the configuration generated by this role. <br> | ||
|
||
The order in which cluster configuration is generated before it's passed to `ha_cluster` role is: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. README.md is loaded from argument_spec file so changes here do not make sense. These instructions can be part of section https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_ha_pacemaker_cluster/README.md#further-information and they have to be marked as EXPERIMENTAL. |
||
1. `ha_cluster*` variables (if defined). | ||
2. Configuration created by this role based on provided parameters. | ||
3. The content of `sap_ha_[pacemaker|cluster]*_append` variables is appended. | ||
<br> | ||
|
||
NOTE: The config in the `*_append` variables is appended only if this role has created entries in the equivalent HA cluster variable e.g. `ha_cluster_constraints_colocation` during the run. If nothing has been defined by this role, there is no reason to append anything. In this case just use the appropriate `ha_cluster*` variable (step 1. above). | ||
<br> | ||
|
||
<!-- END Role Variables --> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,17 +69,17 @@ | |
- name: "SAP HA Prepare Pacemaker - (ha_cluster) Define parameter 'ha_cluster_constraints_colocation'" | ||
when: __sap_ha_pacemaker_cluster_constraints_colocation is defined | ||
ansible.builtin.set_fact: | ||
ha_cluster_constraints_colocation: "{{ __sap_ha_pacemaker_cluster_constraints_colocation }}" | ||
ha_cluster_constraints_colocation: "{{ __sap_ha_pacemaker_cluster_constraints_colocation + sap_ha_pacemaker_cluster_constraints_colocation_append | d([]) }}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We cannot just invent new naming convention. Same applies to rest of variables for appending. |
||
|
||
- name: "SAP HA Prepare Pacemaker - (ha_cluster) Define parameter 'ha_cluster_constraints_location'" | ||
when: __sap_ha_pacemaker_cluster_constraints_location is defined | ||
ansible.builtin.set_fact: | ||
ha_cluster_constraints_location: "{{ __sap_ha_pacemaker_cluster_constraints_location }}" | ||
ha_cluster_constraints_location: "{{ __sap_ha_pacemaker_cluster_constraints_location + sap_ha_cluster_constraints_location_append | d([]) }}" | ||
|
||
- name: "SAP HA Prepare Pacemaker - (ha_cluster) Define parameter 'ha_cluster_constraints_order'" | ||
when: __sap_ha_pacemaker_cluster_constraints_order is defined | ||
ansible.builtin.set_fact: | ||
ha_cluster_constraints_order: "{{ __sap_ha_pacemaker_cluster_constraints_order }}" | ||
ha_cluster_constraints_order: "{{ __sap_ha_pacemaker_cluster_constraints_order + sap_ha_pacemaker_cluster_constraints_order_append | d([]) }}" | ||
|
||
- name: "SAP HA Prepare Pacemaker - (ha_cluster) Define parameter 'ha_cluster_extra_packages'" | ||
when: __sap_ha_pacemaker_cluster_extra_packages is defined | ||
|
@@ -105,7 +105,7 @@ | |
- name: "SAP HA Prepare Pacemaker - (ha_cluster) Define parameter 'ha_cluster_resource_clones'" | ||
when: __sap_ha_pacemaker_cluster_resource_clones is defined | ||
ansible.builtin.set_fact: | ||
ha_cluster_resource_clones: "{{ __sap_ha_pacemaker_cluster_resource_clones }}" | ||
ha_cluster_resource_clones: "{{ __sap_ha_pacemaker_cluster_resource_clones + sap_ha_cluster_resource_clones_append | d([]) }}" | ||
|
||
- name: "SAP HA Prepare Pacemaker - (ha_cluster) Define parameter 'ha_cluster_resource_groups'" | ||
when: __sap_ha_pacemaker_cluster_resource_groups is defined | ||
|
@@ -115,7 +115,7 @@ | |
- name: "SAP HA Prepare Pacemaker - (ha_cluster) Define parameter 'ha_cluster_resource_primitives'" | ||
when: __sap_ha_pacemaker_cluster_resource_primitives is defined | ||
ansible.builtin.set_fact: | ||
ha_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives }}" | ||
ha_cluster_resource_primitives: "{{ __sap_ha_pacemaker_cluster_resource_primitives + sap_ha_cluster_resource_primitives_append | d([]) }}" | ||
no_log: true # be paranoid, there could be credentials in it | ||
|
||
- name: "SAP HA Prepare Pacemaker - (ha_cluster) Define parameter 'ha_cluster_totem'" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These sentences are bit on the nose, because it contains too many negatives as it tells me: "Hey, this role barely works"