parent
a5541efd73
commit
429091c696
|
@ -35,7 +35,7 @@
|
|||
Name: %{package_name}
|
||||
Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products
|
||||
Version: 3.1.1
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
License: GPLv3+
|
||||
Url: https://github.com/berndfinger
|
||||
Source0: https://github.com/linux-system-roles/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
|
||||
|
@ -45,8 +45,10 @@ Source3: https://github.com/berndfinger/sap-netweaver-preconfigure/archive/%{git
|
|||
Source4: README.md
|
||||
Source5: galaxy.yml
|
||||
# patches 0-49 for sap-preconfigure
|
||||
Patch1: sap-preconfigure-69de334fecbce65506bbea15b1b9bcd643528352.patch
|
||||
# patches 50-99 for sap-hana-preconfigure
|
||||
Patch50: sap-hana-preconfigure-md2html-error.patch
|
||||
Patch51: sap-hana-preconfigure-f30be1952fe55cc4a5e153bfd13863f527643d40.patch
|
||||
# patches 100-149 for sap-netweaver-preconfigur
|
||||
Patch100: sap-netweaver-preconfigure-rhel9.patch
|
||||
|
||||
|
@ -132,8 +134,12 @@ mkdir .collections
|
|||
cp %{SOURCE5} galaxy.yml
|
||||
sed -i -e 's|name: rhel|name: %{collection_name}|' galaxy.yml
|
||||
|
||||
pushd sap-preconfigure
|
||||
%patch1 -p1
|
||||
pop
|
||||
pushd sap-hana-preconfigure
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
popd
|
||||
pushd sap-netweaver-preconfigure
|
||||
%patch100 -p1
|
||||
|
@ -243,6 +249,9 @@ popd
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Aug 20 2021 Than Ngo <than@redhat.com> - 3.1.1-10
|
||||
- Related: #1977195, fix #149, #177, #193, #194
|
||||
|
||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.1-9
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
|
|
@ -0,0 +1,185 @@
|
|||
commit f30be1952fe55cc4a5e153bfd13863f527643d40
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
Date: Wed Aug 11 21:38:45 2021 +0200
|
||||
|
||||
Solve issues #177, #193, and #194.
|
||||
|
||||
diff --git a/tasks/RedHat/generic/assert-tsx.yml b/tasks/RedHat/generic/assert-tsx.yml
|
||||
index 4ace64c..d7da1d2 100644
|
||||
--- a/tasks/RedHat/generic/assert-tsx.yml
|
||||
+++ b/tasks/RedHat/generic/assert-tsx.yml
|
||||
@@ -4,6 +4,24 @@
|
||||
msg: "imported RedHat/generic/assert-tsx.yml"
|
||||
|
||||
- block:
|
||||
+# There are CPUs which are not capable of enabling the rtm flag, so we just report the status:
|
||||
+ - name: Get all CPU flags
|
||||
+ shell: lscpu | grep "^Flags:"
|
||||
+ register: __sap_hana_preconfigure_register_lscpu_flags
|
||||
+ changed_when: no
|
||||
+
|
||||
+ - name: Report that the rtm CPU flag exists
|
||||
+ debug:
|
||||
+ msg: "INFO: The CPU flags contain ' rtm'."
|
||||
+ when: "' rtm' in __sap_hana_preconfigure_register_lscpu_flags.stdout"
|
||||
+
|
||||
+ - name: Report that the rtm CPU flag does not exist
|
||||
+ debug:
|
||||
+ msg: "INFO: The CPU flags do not contain ' rtm'."
|
||||
+ when: "' rtm' not in __sap_hana_preconfigure_register_lscpu_flags.stdout"
|
||||
+
|
||||
+# Note: Assertions are only necessary if rtm is not in the CPU flags.
|
||||
+# If rtm is present, we just print an INFO message.
|
||||
- name: Get contents of GRUB_CMDLINE_LINUX in /etc/default/grub
|
||||
command: grep GRUB_CMDLINE_LINUX /etc/default/grub
|
||||
register: __sap_hana_preconfigure_register_default_grub_cmdline_tsx_assert
|
||||
@@ -15,6 +33,21 @@
|
||||
fail_msg: "FAIL: 'tsx=on' is not in GRUB_CMDLINE_LINUX in /etc/default/grub!"
|
||||
success_msg: "PASS: 'tsx=on' is in GRUB_CMDLINE_LINUX in /etc/default/grub."
|
||||
ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}"
|
||||
+ when: "' rtm' not in __sap_hana_preconfigure_register_lscpu_flags.stdout"
|
||||
+
|
||||
+ - name: Report if tsx=on is in GRUB_CMDLINE_LINUX in /etc/default/grub
|
||||
+ debug:
|
||||
+ msg: "INFO: 'tsx=on' is in GRUB_CMDLINE_LINUX in /etc/default/grub."
|
||||
+ when:
|
||||
+ - "'tsx=on' in __sap_hana_preconfigure_register_default_grub_cmdline_tsx_assert.stdout"
|
||||
+ - "' rtm' in __sap_hana_preconfigure_register_lscpu_flags.stdout"
|
||||
+
|
||||
+ - name: Report if tsx=on is not in GRUB_CMDLINE_LINUX in /etc/default/grub
|
||||
+ debug:
|
||||
+ msg: "INFO: 'tsx=on' is not in GRUB_CMDLINE_LINUX in /etc/default/grub."
|
||||
+ when:
|
||||
+ - "'tsx=on' not in __sap_hana_preconfigure_register_default_grub_cmdline_tsx_assert.stdout"
|
||||
+ - "' rtm' in __sap_hana_preconfigure_register_lscpu_flags.stdout"
|
||||
|
||||
- name: Get contents of /proc/cmdline
|
||||
command: cat /proc/cmdline
|
||||
@@ -27,20 +60,21 @@
|
||||
fail_msg: "FAIL: 'tsx=on' is not in /proc/cmdline!"
|
||||
success_msg: "PASS: 'tsx=on' is in /proc/cmdline."
|
||||
ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}"
|
||||
+ when: "' rtm' not in __sap_hana_preconfigure_register_lscpu_flags.stdout"
|
||||
|
||||
-# We are counting the number of cpuinfo lines which contain "flags" and subtracting those lines
|
||||
-# which contain "flags" and " rtm ". If the result is 0, all CPUs contain flag "rtm".
|
||||
- - name: Get rtm status of all CPUs
|
||||
- shell: awk '$1=="flags"{n++}$1=="flags"&&$0~" rtm" {a++}END{print n-a}' /proc/cpuinfo
|
||||
- register: __sap_hana_preconfigure_register_cpuinfo_flags_contain_rtm
|
||||
- changed_when: no
|
||||
+ - name: Report if tsx=on is in /proc/cmdline
|
||||
+ debug:
|
||||
+ msg: "INFO: 'tsx=on' is in /proc/cmdline."
|
||||
+ when:
|
||||
+ - "'tsx=on' in __sap_hana_preconfigure_register_proc_cmdline_tsx_assert.stdout"
|
||||
+ - "' rtm' in __sap_hana_preconfigure_register_lscpu_flags.stdout"
|
||||
|
||||
- - name: Assert that all CPUs contain flag rtm
|
||||
- assert:
|
||||
- that: "__sap_hana_preconfigure_register_cpuinfo_flags_contain_rtm.stdout == '0'"
|
||||
- fail_msg: "FAIL: At least one of the CPUs does not contain flag 'rtm'!"
|
||||
- success_msg: "PASS: All CPUs contain flag 'rtm'."
|
||||
- ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors|d(false) }}"
|
||||
+ - name: Report if tsx=on is not in /proc/cmdline
|
||||
+ debug:
|
||||
+ msg: "INFO: 'tsx=on' is not in /proc/cmdline."
|
||||
+ when:
|
||||
+ - "'tsx=on' not in __sap_hana_preconfigure_register_proc_cmdline_tsx_assert.stdout"
|
||||
+ - "' rtm' in __sap_hana_preconfigure_register_lscpu_flags.stdout"
|
||||
|
||||
when: ansible_architecture == 'x86_64' and
|
||||
ansible_distribution == 'RedHat' and
|
||||
diff --git a/tasks/RedHat/generic/enable-tsx.yml b/tasks/RedHat/generic/enable-tsx.yml
|
||||
index 879f0bf..3dd6d09 100644
|
||||
--- a/tasks/RedHat/generic/enable-tsx.yml
|
||||
+++ b/tasks/RedHat/generic/enable-tsx.yml
|
||||
@@ -3,7 +3,16 @@
|
||||
- debug:
|
||||
msg: "imported RedHat/generic/enable-tsx.yml"
|
||||
|
||||
-- name: Enable TSX at boot time
|
||||
+- name: Get the CPU flags
|
||||
+ shell: lscpu | grep "^Flags"
|
||||
+ register: __sap_hana_preconfigure_register_lscpu
|
||||
+ when:
|
||||
+ - ansible_architecture == 'x86_64'
|
||||
+ - ansible_distribution == 'RedHat'
|
||||
+ - ansible_distribution_major_version == '8'
|
||||
+ - __sap_hana_preconfigure_fact_ansible_distribution_minor_version >= '3'
|
||||
+
|
||||
+- name: Enable TSX at boot time if CPU flag rtm is not present
|
||||
lineinfile:
|
||||
path: /etc/default/grub
|
||||
backup: yes
|
||||
@@ -14,10 +23,12 @@
|
||||
with_items:
|
||||
- "tsx=on"
|
||||
notify: __sap_hana_preconfigure_regenerate_grub2_conf_handler
|
||||
- when: ansible_architecture == 'x86_64' and
|
||||
- ansible_distribution == 'RedHat' and
|
||||
- ansible_distribution_major_version == '8' and
|
||||
- __sap_hana_preconfigure_fact_ansible_distribution_minor_version >= '3'
|
||||
+ when:
|
||||
+ - ansible_architecture == 'x86_64'
|
||||
+ - ansible_distribution == 'RedHat'
|
||||
+ - ansible_distribution_major_version == '8'
|
||||
+ - __sap_hana_preconfigure_fact_ansible_distribution_minor_version >= '3'
|
||||
+ - not ' rtm' in __sap_hana_preconfigure_register_lscpu.stdout
|
||||
tags: grubconfig
|
||||
loop_control:
|
||||
loop_var: line_item
|
||||
diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml
|
||||
index fabeaac..a5bdb94 100644
|
||||
--- a/tasks/RedHat/installation.yml
|
||||
+++ b/tasks/RedHat/installation.yml
|
||||
@@ -63,22 +63,19 @@
|
||||
- ansible_architecture == "ppc64le"
|
||||
- sap_hana_preconfigure_add_ibm_power_repo|d(true)
|
||||
|
||||
-- name: Accept the license for the IBM tools
|
||||
- shell: |
|
||||
- MORE=+1000 /opt/ibm/lop/configure <<-EOF
|
||||
- y
|
||||
- EOF
|
||||
+- name: Accept the license for the IBM Service and Productivity Tools
|
||||
+ shell: LESS=+q /opt/ibm/lop/configure <<<'y'
|
||||
when:
|
||||
- ansible_architecture == "ppc64le"
|
||||
- sap_hana_preconfigure_add_ibm_power_repo|d(true)
|
||||
|
||||
-- name: Install IBM tools
|
||||
+- name: Install the IBM Service and Productivity Tools
|
||||
package:
|
||||
state: latest
|
||||
name: "{{ __sap_hana_preconfigure_required_ppc64le }}"
|
||||
when: ansible_architecture == "ppc64le"
|
||||
|
||||
-- name: Get status of installed IBM tools
|
||||
+- name: Get the status of installed IBM Service and Productivity Tools
|
||||
yum:
|
||||
name: "{{ __sap_hana_preconfigure_required_ppc64le }}"
|
||||
register: __sap_hana_preconfigure_register_required_ppc64le_packages
|
||||
diff --git a/tasks/sapnote/2055470.yml b/tasks/sapnote/2055470.yml
|
||||
index 5efbd6d..697913c 100644
|
||||
--- a/tasks/sapnote/2055470.yml
|
||||
+++ b/tasks/sapnote/2055470.yml
|
||||
@@ -32,7 +32,7 @@
|
||||
loop_var: line_item
|
||||
|
||||
## This only works if interfacename=device name, otherwise it fails
|
||||
-- name: add largesend options to interface
|
||||
+- name: Add largesend options to interfaces
|
||||
lineinfile:
|
||||
regexp: '^ETHTOOL_OPTIONS_tso='
|
||||
line: ETHTOOL_OPTIONS_tso='-K iface tso on'
|
||||
@@ -45,8 +45,9 @@
|
||||
)
|
||||
loop_control:
|
||||
loop_var: line_item
|
||||
+ ignore_errors: true
|
||||
|
||||
-- name: Add largesend parameters for ppc64le
|
||||
+- name: Add largesend kernel parameters for ppc64le
|
||||
sysctl:
|
||||
sysctl_file: /etc/sysctl.d/ibm_largesend.conf
|
||||
name: "{{ line_item.name }}"
|
|
@ -0,0 +1,29 @@
|
|||
commit 69de334fecbce65506bbea15b1b9bcd643528352
|
||||
Author: Bernd Finger <bfinger@redhat.com>
|
||||
Date: Wed Aug 11 21:50:14 2021 +0200
|
||||
|
||||
Solve issue #149
|
||||
|
||||
diff --git a/tasks/installation.yml b/tasks/installation.yml
|
||||
index 7dbab15..096c993 100644
|
||||
--- a/tasks/installation.yml
|
||||
+++ b/tasks/installation.yml
|
||||
@@ -1,9 +1,15 @@
|
||||
---
|
||||
|
||||
- name: Ensure required package groups are installed
|
||||
- package:
|
||||
- state: present
|
||||
- name: "{{ sap_preconfigure_packagegroups }}"
|
||||
+# Note: We cannot use the package module here as this will do a default group install,
|
||||
+# which could lead to unwanted package upgrades. See bug 1983749.
|
||||
+ command: yum install "{{ sap_preconfigure_packagegroups|join('')|quote }}" --skip-broken --exclude="kernel*" -y
|
||||
+ args:
|
||||
+ warn: false
|
||||
+ register: __sap_preconfigure_register_yum_group_install
|
||||
+
|
||||
+- debug:
|
||||
+ var: __sap_preconfigure_register_yum_group_install
|
||||
|
||||
- name: Ensure required packages are installed
|
||||
package:
|
Loading…
Reference in New Issue