In Google Cloud, a TCP Internal Load Balancer is used to facilitate failover of the SAP HANA virtual IP. The frontend of the load balancer is assigned an ephemeral IP from the subnet that it operates in. In this example, we will be using the following IP address for load balancer corresponding to the sps-hana virtual hostname:

Instance
Virtual Host Name
Internal TCP Load Balancer
Frontend IP Address
HDB00 sps-hana ilb-sps-hana 10.20.0.5

Following the steps provided in Google Cloud – Using an Internal Load Balancer and Responding to Load Balancer Health Checks, create and configure the following Google Cloud and LifeKeeper resources.

  1. Create two unmanaged instance groups: ig-sps-hana-zone1, containing node-a, and ig-sps-hana-zone2, containing node-b.

  1. Create a TCP Internal Load Balancer, ilb-sps-hana, with the following properties. The icon indicates that the default option is chosen.
Name
ilb-sps-hana
Backend configuration
Region <Deployment region> (e.g., us-east1)
Network lk-vpc
Backends ig-sps-hana-zone1
ig-sps-hana-zone2
Health Check
Name hc-sps-hana
Protocol TCP
Port 50098 (This must agree with the corresponding LifeKeeper GenLB resource created later)
Proxy protocol NONE
Request Leave empty
Response Leave empty
Check interval 5 seconds
Timeout 5 seconds
Healthy threshold 2 consecutive successes
Unhealthy threshold 2 consecutive failures
Connection draining timeout 10 seconds
Frontend configuration
Name fe-sps-hana
Subnetwork lk-subnet
Purpose Non-shared
IP address Ephemeral (Custom)
Custom ephemeral IP address 10.20.0.5
Ports All
Global access Disable
Service label Leave empty

Once created, the Network services → Load balancing page in the Google Cloud Console will show the load balancer.

  1. Follow the steps described in the Disable IP Forwarding section of Google Cloud – Using an Internal Load Balancer to allow node-a and node-b to communicate through the frontend IP addresses of the load balancer. Reboot node-a and node-b for the changes to take effect.

Note that this step is not strictly required in order to connect to the primary database through the load balancer frontend IP address, but it will make it possible to test the database connection from within the cluster, as described in the Test Switchover and Failover section.

  1. Following the steps described in Creating an IP Resource, use the following parameters to create and extend a LifeKeeper IP resources (ip-sps-hana), with net mask 255.255.255.255, to protect the SAP HANA virtual IP address on node-a and node-b. Notice that ip-sps-hana is created on node-a and extended to node-b. Also note that this IP resource should not be extended to node-c, the witness node. The icon indicates that the default option is chosen.
Field
Value
Create Resource Wizard
Switchback Type intelligent
Server node-a
IP Resource 10.20.0.5
Netmask 255.255.255.255
Network Interface eth0
IP Resource Tag ip-sps-hana
Pre-Extend Wizard
Target Server node-b
Switchback Type intelligent
Template Priority 1
Target Priority 10
Extend comm/ip Resource Hierarchy Wizard
IP Resource 10.20.0.5
Netmask 255.255.255.255
Network Interface eth0
IP Resource Tag ip-sps-hana

Once the IP resource has been created successfully, the LifeKeeper GUI should resemble the following image.

  1. Following the steps in Responding to Load Balancer Health Checks, install the LifeKeeper Generic Application Recovery Kit for Load Balancer Health Checks (“GenLB Recovery Kit”) and create a LifeKeeper GenLB resource, ilb-sps-hana, with the following properties. The icon indicates that the default option is chosen.
Field
Value
Create Resource Wizard
Switchback Type intelligent
Server node-a
Restore Script /opt/LifeKeeper/SIOS_Hotfixes/Gen-LB-PL-7172/restore.pl
Remove Script /opt/LifeKeeper/SIOS_Hotfixes/Gen-LB-PL-7172/remove.pl
QuickCheck Script /opt/LifeKeeper/SIOS_Hotfixes/Gen-LB-PL-7172/quickCheck
(Note: Although the quickCheck script may be optional for some ‘Generic Application’ resource types, it is required for GenLB resources.)
Local Recovery Script None (Empty)
Application Info 50098
Bring Resource In Service Yes
Resource Tag ilb-sps-hana
Pre-Extend Wizard
Target Server node-b
Switchback Type intelligent
Template Priority 1
Target Priority 10
Extend gen/app Resource Hierarchy Wizard
Resource Tag ilb-sps-hana
Application Info 50098

The resource will appear in the LifeKeeper GUI resource pane once it has been created and extended successfully.

  1. Right-click the ilb-sps-hana resource on node-a and click “Create Dependency…” Specify ip-sps-hana as the Child Resource Tag and click Create Dependency.

Once the dependency has been created, the LifeKeeper GUI should resemble the following image.

  1. Add the following entry to /etc/hosts on node-a and node-b to allow resolution of the virtual hostname to the frontend IP address of the corresponding load balancer:

10.20.0.5 sps-hana

  1. Test switchover and failover of the GenLB resources as described in the Test GenLB Resource Switchover and Failover section of Responding to Load Balancer Health Checks. Correct any issues found or tune the parameters of the load balancer health checks as required to achieve successful operation.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment