community.sap_install
community.sap_install copied to clipboard
sap_hana_preconfigure: two kernel parameters for NetApp are not set correctly
NetApp recommends in SAP note 3024346 to set net.core.rmem_max and net.core.wmem_max in file /etc/sysctl.d/91-NetApp-HANA.conf. The role sap_hana_preconfigure typically sets these parameters to a lower value as per SAP note 2382421, and uses the file /etc/sysctl.d/sap_hana.conf to store these values. SAP note 2382421 recommends to use file /etc/sysctl.conf.
As per the sysctl precedence rules described in "man sysctl.d":
- "All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in."
- "If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence."
- The file "sap_hana.conf" is lexicographically sorted after "91-NetApp_HANA.conf":
# printf "/etc/sysctl.d/sap_hana.conf\n/etc/sysctl.d/91-NetApp-HANA.conf\n" | sort
/etc/sysctl.d/91-NetApp-HANA.conf
/etc/sysctl.d/sap_hana.conf
Because of this, only the lower value of the above mentioned parameters is set. The general rule for all parameters is however to use the larger value of parameters in case of conflicting recommendations.
The role however does not set the two parameters net.core.rmem_max and net.core.wmem_max in /etc/sysctl.d/sap_hana.conf if sap_hana_preconfigure_use_netapp_settings_nfs is set to true. So the error can happen if the role is first executed with the default for sap_hana_preconfigure_use_netapp_settings_nfs, which is false, and then with sap_hana_preconfigure_use_netapp_settings_nfs set to true.
The solution appears to be not to set net.core.rmem_max and net.core.wmem_max in /etc/sysctl.d/sap_hana.conf if sap_hana_preconfigure_use_netapp_settings_nfs is set to true.
However, it still can happen that these entries are in file /etc/sysctl.d/sap_hana.conf. So the role should probably remove net.core.rmem_max and net.core.wmem_max if sap_hana_preconfigure_use_netapp_settings_nfs is set to true.