diff --git a/roles/sap_hana_preconfigure/README.md b/roles/sap_hana_preconfigure/README.md index 6ee18a682..4459ca657 100644 --- a/roles/sap_hana_preconfigure/README.md +++ b/roles/sap_hana_preconfigure/README.md @@ -326,13 +326,6 @@ Network related linux kernel parameter settings for platform ppc64le.
Set to `true` to also set NetApp NFS required kernel parameters.
-### sap_hana_preconfigure_use_netapp_settings_nfsv3 -- _Type:_ `bool` -- _Default:_ `false` - -If `sap_hana_preconfigure_use_netapp_settings_nfs` is set to `true` and NFS Version 3 is to be used,
-this parameter must be set to `true` as well.
- ### sap_hana_preconfigure_install_ibm_power_tools - _Type:_ `bool` - _Default:_ `true` diff --git a/roles/sap_hana_preconfigure/defaults/main.yml b/roles/sap_hana_preconfigure/defaults/main.yml index de9bb3efd..741fed623 100644 --- a/roles/sap_hana_preconfigure/defaults/main.yml +++ b/roles/sap_hana_preconfigure/defaults/main.yml @@ -130,10 +130,6 @@ sap_hana_preconfigure_kernel_parameters_ppc64le: "{{ __sap_hana_preconfigure_ker sap_hana_preconfigure_use_netapp_settings_nfs: false # Set to `true` to also set NetApp NFS required kernel parameters. -sap_hana_preconfigure_use_netapp_settings_nfsv3: false -# If `sap_hana_preconfigure_use_netapp_settings_nfs` is set to `true` and NFS Version 3 is to be used, -# this parameter must be set to `true` as well. - sap_hana_preconfigure_install_ibm_power_tools: true # Set this parameter to `false` to not install the IBM Power Systems service and productivity tools. diff --git a/roles/sap_hana_preconfigure/meta/argument_specs.yml b/roles/sap_hana_preconfigure/meta/argument_specs.yml index 1d3427b70..159ed5df1 100644 --- a/roles/sap_hana_preconfigure/meta/argument_specs.yml +++ b/roles/sap_hana_preconfigure/meta/argument_specs.yml @@ -273,14 +273,6 @@ argument_specs: required: false type: bool - sap_hana_preconfigure_use_netapp_settings_nfsv3: - default: false - description: - - If `sap_hana_preconfigure_use_netapp_settings_nfs` is set to `true` and NFS Version 3 is to be used, - - this parameter must be set to `true` as well. - required: false - type: bool - sap_hana_preconfigure_install_ibm_power_tools: default: true description: diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml b/roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml index 0f54ec48f..795bbfcb2 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 . @@ -50,11 +66,10 @@ ansible.builtin.debug: var: __sap_hana_preconfigure_register_netapp_sysctl_p_output_new.stdout_lines - - name: Set kernel tunable for NFSv3 as per SAP note 3024346 + - name: Set kernel tunable 'tcp_max_slot_table_entries' to '128' in file '/etc/modprobe.d/sunrpc.conf' ansible.builtin.lineinfile: path: /etc/modprobe.d/sunrpc.conf - create: yes + create: true mode: "0644" regexp: '^options sunrpc tcp_max_slot_table_entries' line: options sunrpc tcp_max_slot_table_entries=128 - when: sap_hana_preconfigure_use_netapp_settings_nfsv3 diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml b/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml index 62ea19343..7dcbd7b6b 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/assert-3024346.yml @@ -43,25 +43,25 @@ - sap_hana_preconfigure_use_netapp_settings_nfs | d(false) - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) -- name: Check NetApp modprobe conf file for SAP HANA with NFSv3 +- name: Check NetApp modprobe conf file for SAP HANA when: - - sap_hana_preconfigure_use_netapp_settings_nfsv3 | d(false) + - sap_hana_preconfigure_use_netapp_settings_nfs | d(false) - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) block: - - name: Get info about file /etc/modprobe.d/sunrpc.conf + - name: Get info about file '/etc/modprobe.d/sunrpc.conf' ansible.builtin.stat: path: /etc/modprobe.d/sunrpc.conf register: __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert - - name: Assert that file /etc/modprobe.d/sunrpc.conf exists + - name: Assert that file '/etc/modprobe.d/sunrpc.conf' exists ansible.builtin.assert: that: __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.exists fail_msg: "FAIL: File /etc/modprobe.d/sunrpc.conf does not exist!" success_msg: "PASS: File /etc/modprobe.d/sunrpc.conf exists." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" - - name: Assert that file /etc/modprobe.d/sunrpc.conf is a regular file + - name: Assert that file '/etc/modprobe.d/sunrpc.conf' is a regular file ansible.builtin.assert: that: __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.isreg fail_msg: "FAIL: File /etc/modprobe.d/sunrpc.conf is not a regular file!" @@ -69,17 +69,17 @@ ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.exists -- name: Get value of 'options sunrpc tcp_max_slot_table_entries' from /etc/modprobe.d/sunrpc.conf +- name: Get value of 'options sunrpc tcp_max_slot_table_entries' from '/etc/modprobe.d/sunrpc.conf' ansible.builtin.command: awk 'BEGIN{FS="="}/options sunrpc tcp_max_slot_table_entries/{print $NF}' /etc/modprobe.d/sunrpc.conf register: __sap_hana_preconfigure_register_tcp_max_slot_table_entries_assert changed_when: no ignore_errors: yes when: - - sap_hana_preconfigure_use_netapp_settings_nfsv3 | d(false) + - sap_hana_preconfigure_use_netapp_settings_nfs | d(false) - __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.exists - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) -- name: Assert that 'options sunrpc tcp_max_slot_table_entries' is set correctly in /etc/modprobe.d/sunrpc.conf +- name: Assert that 'options sunrpc tcp_max_slot_table_entries' is set correctly in '/etc/modprobe.d/sunrpc.conf' ansible.builtin.assert: that: __sap_hana_preconfigure_register_tcp_max_slot_table_entries_assert.stdout == '128' fail_msg: "FAIL: The value of 'options sunrpc tcp_max_slot_table_entries' in '/etc/modprobe.d/sunrpc.conf' is @@ -88,6 +88,6 @@ '{{ __sap_hana_preconfigure_register_tcp_max_slot_table_entries_assert.stdout }}'." ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: - - sap_hana_preconfigure_use_netapp_settings_nfsv3 | d(false) + - sap_hana_preconfigure_use_netapp_settings_nfs | d(false) - __sap_hana_preconfigure_register_etc_modprobe_sunrpc_conf_assert.stat.exists - sap_hana_preconfigure_config_all | d(true) or sap_hana_preconfigure_3024346 | d(false) diff --git a/roles/sap_hana_preconfigure/vars/RedHat_7.yml b/roles/sap_hana_preconfigure/vars/RedHat_7.yml index ba44937f8..e1c09763a 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_7.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_7.yml @@ -45,14 +45,14 @@ __sap_hana_preconfigure_sapnotes_versions_x86_64: - { number: '2009879', version: '28' } - { number: '2292690', version: '38' } - { number: '2382421', version: '40' } - - { number: '3024346', version: '3' } + - { number: '3024346', version: '10' } __sap_hana_preconfigure_sapnotes_versions_ppc64le: - { number: '2009879', version: '28' } - { number: '2055470', version: '85' } - { number: '2292690', version: '38' } - { number: '2382421', version: '40' } - - { number: '3024346', version: '3' } + - { number: '3024346', version: '10' } __sap_hana_preconfigure_sapnotes_versions: "{{ lookup('vars', '__sap_hana_preconfigure_sapnotes_versions_' + ansible_architecture) }}" diff --git a/roles/sap_hana_preconfigure/vars/RedHat_8.yml b/roles/sap_hana_preconfigure/vars/RedHat_8.yml index d040ea03e..432848f1a 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_8.yml @@ -125,13 +125,13 @@ __sap_hana_preconfigure_req_repos_redhat_8_10_ppc64le: __sap_hana_preconfigure_sapnotes_versions_x86_64: - { number: '2777782', version: '40' } - { number: '2382421', version: '40' } - - { number: '3024346', version: '3' } + - { number: '3024346', version: '10' } __sap_hana_preconfigure_sapnotes_versions_ppc64le: - { number: '2055470', version: '87' } - { number: '2777782', version: '40' } - { number: '2382421', version: '40' } - - { number: '3024346', version: '3' } + - { number: '3024346', version: '10' } __sap_hana_preconfigure_sapnotes_versions: "{{ lookup('vars', '__sap_hana_preconfigure_sapnotes_versions_' + ansible_architecture) }}" diff --git a/roles/sap_hana_preconfigure/vars/RedHat_9.yml b/roles/sap_hana_preconfigure/vars/RedHat_9.yml index 8c3b476b6..ebc31864c 100644 --- a/roles/sap_hana_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_hana_preconfigure/vars/RedHat_9.yml @@ -122,13 +122,13 @@ __sap_hana_preconfigure_req_repos_redhat_9_10_ppc64le: __sap_hana_preconfigure_sapnotes_versions_x86_64: - { number: '3108302', version: '9' } - { number: '2382421', version: '45' } - - { number: '3024346', version: '3' } + - { number: '3024346', version: '10' } __sap_hana_preconfigure_sapnotes_versions_ppc64le: - { number: '2055470', version: '90' } - { number: '3108302', version: '9' } - { number: '2382421', version: '45' } - - { number: '3024346', version: '3' } + - { number: '3024346', version: '10' } __sap_hana_preconfigure_sapnotes_versions: "{{ lookup('vars', '__sap_hana_preconfigure_sapnotes_versions_' + ansible_architecture) }}"