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: Add support for clustered WebDisp systems #929

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

rob0d
Copy link
Contributor

@rob0d rob0d commented Jan 10, 2025

Hi all,
@marcelmamula @ja9fuchs
This PR adds option to configure a clustered SAP Web Dispatcher system.

Rationale: SAP WebDisp (WD) needs to be resilient in the same way Central Services (ASCS) do.
In cloud environments resiliency is generally achieved by installing multiple WD instances and putting a load balancer in front of them. However, with on-prem deployments load balancer is usually an overkill for small to medium deployments as it can have impact on supportability and costs. So specifically with on-prem bare-metal and VMware installations in mind this PR adds supports for clustered WDs.

Thanks to the clever way the ha_pacemaker_cluster role is written, it was relatively easy to add another host type (sap_ha_pacemaker_cluster_host_type): sap_webdisp to achieve it.
As far as I can tell (tested on 8 systems) it is completely non-impacting enhancement and can be used stand-alone or together with other cluster host types (mainly nwas_abap_ascs_ers).

It was tested on-prem only and may need a minimal enhancement for different cloud providers. Although I am not sure if there is a usage case for that.

The minimal input for it to work is as the following:

# SID and Instance Numbers for WebDisp.
sap_ha_pacemaker_cluster_wdp_sid: <WebDisp SID>
sap_ha_pacemaker_cluster_wdp_instance_nr:  <xx>
 
# Profile name created by the installer
sap_ha_pacemaker_cluster_wdp_sapinstance_instance_name: "{{ sap_ha_pacemaker_cluster_wdp_sid }}_W{{ sap_ha_pacemaker_cluster_wdp_instance_nr }}_<virtual_wdp_hostname>"
sap_ha_pacemaker_cluster_wdp_sapinstance_start_profile_string: "/sapmnt/{{ sap_ha_pacemaker_cluster_wdp_sid  }}/profile/{{ sap_ha_pacemaker_cluster_wdp_sid }}_W{{ sap_ha_pacemaker_cluster_wdp_instance_nr }}_<virtual_wdp_hostname>"
sap_ha_pacemaker_cluster_vip_wdp_ip_address: <virtual_wdp_ip>
 
# Filesystem definitions for WebDisp
# the rest can remain default
sap_ha_pacemaker_cluster_wdp_filesystem_host_mount_path: "{{ sap_storage_setup_nfs_local }}/usr/sap/{{ sap_ha_pacemaker_cluster_wdp_sid }}/W{{ sap_ha_pacemaker_cluster_wdp_instance_nr }}"

Note: For some reason Github has decided that few files can't be merged automatically and is marking the whole file as different even though only 1 line was changed. I'm not sure if I've done something wrong, but I can't see it. Any advice would be appreciated.

@marcelmamula
Copy link
Contributor

@rob0d I see you created branch only 6 days ago so it should not be problem in regards to being out of sync.
I would either:

  1. (if there was no commit) Save changes from problematic files to separate file, discard changes and reapply.
  2. Try to rebase/sync
  3. Stash changes, recreate new branch and reapply from stash.
  4. Maybe @berndfinger has another idea.

We cannot currently look into code as those re-created files make it impossible to read changes.

@marcelmamula
Copy link
Contributor

@rob0d Webdispatcher is usually such tiny system that it is most likely bolted on some existing system, where cluster can be already.
Can you clarify if this is scenario for pure WD cluster hosts?

@rob0d
Copy link
Contributor Author

rob0d commented Jan 14, 2025

@rob0d I see you created branch only 6 days ago so it should not be problem in regards to being out of sync. I would either:

1. (if there was no commit) Save changes from problematic files to separate file, discard changes and reapply.

2. Try to rebase/sync

3. Stash changes, recreate new branch and reapply from stash.

4. Maybe @berndfinger has another idea.

We cannot currently look into code as those re-created files make it impossible to read changes.

Hi @marcelmamula,
That's what I did. I created a fresh branch, put the code into it and then merged manually, submitted commit. It's just 3 files it marked as completely different. I will try again, but as I don't understand what I'm doing wrong, it's difficult to avoid it.
The code I've just submitted is in a separate private repo that's 6 months old and this code is 3 months old. I have to download and transfer the files from there to my laptop and then merge the code on my laptop, so it's quite painful if there are too many differences.

@rob0d
Copy link
Contributor Author

rob0d commented Jan 14, 2025

@rob0d Webdispatcher is usually such tiny system that it is most likely bolted on some existing system, where cluster can be already. Can you clarify if this is scenario for pure WD cluster hosts?

It can be used as a standalone cluster, but it's rarely worth it. Generally it will be installed on ASCS/ERS cluster via:

sap_ha_pacemaker_cluster_host_type:
 - nwas_abap_ascs_ers
 - sap_webdisp

Or with any other combination of cluster types. I've only tested it with ASCS/ERS.

@marcelmamula
Copy link
Contributor

@rob0d Webdispatcher is usually such tiny system that it is most likely bolted on some existing system, where cluster can be already. Can you clarify if this is scenario for pure WD cluster hosts?

It can be used as a standalone cluster, but it's rarely worth it. Generally it will be installed on ASCS/ERS cluster via:

sap_ha_pacemaker_cluster_host_type:
 - nwas_abap_ascs_ers
 - sap_webdisp

Or with any other combination of cluster types. I've only tested it with ASCS/ERS.

This is actually first case of multi-host_type scenario that we see. We were just discussing with @ja9fuchs that we might need to convert sap_ha_pacemaker_cluster_host_type to string since we cannot justify list.

@rob0d
Copy link
Contributor Author

rob0d commented Jan 14, 2025

I think the way you guys did this is genius as it allows different combinations of cluster deployments.
Installing ASCS/ERS together with HANA DB on one cluster is a valid option (https://docs.redhat.com/en/documentation/red_hat_enterprise_linux_for_sap_solutions/8/html-single/configuring_a_cost-optimized_sap_s4hana_ha_cluster_hana_system_replication_ensa2_using_the_rhel_ha_add-on/index).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants