diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml b/roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml index 765b9316..a63bcb25 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml @@ -25,6 +25,22 @@ loop_control: loop_var: line_item +# Due to sysctl config file precedence rules, it can happen that previous entries in +# __sap_hana_preconfigure_etc_sysctl_saphana_conf remain in effect even after setting +# different parameter values in __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf. +# So we have to ensure that those duplicate entries are not present. +# See also https://github.com/sap-linuxlab/community.sap_install/issues/196. + - name: Ensure kernel tunables for NetApp NFS are not in file '{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}' + ansible.builtin.lineinfile: + path: "{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}" + regexp: ^{{ line_item }} + state: absent + with_items: + - 'net.core.wmem_max' + - 'net.core.rmem_max' + loop_control: + loop_var: line_item + # Note: The sole purpose of the following two tasks is to collect the current value(s) of the kernel parameters # in __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf so that the "Reload kernel parameters from file ..." task # can correctly report its 'changed' state. See also https://github.com/sap-linuxlab/community.sap_install/issues/752 .