import rhel-system-roles-sap-3.1.1-10.el8

This commit is contained in:
CentOS Sources 2022-03-29 16:29:22 -04:00 committed by Stepan Oksanichenko
parent 71c2db57f6
commit 6b1e25784d
7 changed files with 45 additions and 304 deletions

8
.gitignore vendored
View File

@ -1,4 +1,4 @@
SOURCES/auto-maintenance-ec364d2e0bd422b69f34871a1188114f368097a0.tar.gz
SOURCES/sap-hana-preconfigure-9f22b540bc41e2d10fbc1250b36a7ef08129feb2.tar.gz
SOURCES/sap-netweaver-preconfigure-337ba5580ba862e1adac59dcda8a126cdf561225.tar.gz
SOURCES/sap-preconfigure-9bed558b55cedc8939f6b3d4436436a6aaaf095c.tar.gz
SOURCES/auto-maintenance-411f58b0e8da72cd69827d6ed30d8925bea5cb23.tar.gz
SOURCES/sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz
SOURCES/sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz
SOURCES/sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz

View File

@ -1,4 +1,4 @@
bfd618e94056a68c75de22dfcde7b29445850176 SOURCES/auto-maintenance-ec364d2e0bd422b69f34871a1188114f368097a0.tar.gz
91e5bb8f301a95c289cb1464477ffa4efb4755f8 SOURCES/sap-hana-preconfigure-9f22b540bc41e2d10fbc1250b36a7ef08129feb2.tar.gz
aee8838be13eb656116dfe7e73146fbbb557f6cd SOURCES/sap-netweaver-preconfigure-337ba5580ba862e1adac59dcda8a126cdf561225.tar.gz
0ce21e34b45d2d57231d7a48c588295ad464b73f SOURCES/sap-preconfigure-9bed558b55cedc8939f6b3d4436436a6aaaf095c.tar.gz
2c8f0a9cddc4b6ecdfb149c22c86c8c18394aff9 SOURCES/auto-maintenance-411f58b0e8da72cd69827d6ed30d8925bea5cb23.tar.gz
80114f5c167f5f1fa940c3c21145498f54d97f5b SOURCES/sap-hana-preconfigure-083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b.tar.gz
0883d358ca5eb466fad455af80fa1cf8abdef29f SOURCES/sap-netweaver-preconfigure-bf771416116b670ccf17f8e289adbe14df20208b.tar.gz
e9bf401559ab460d4a3079fab8faa2bd7183b170 SOURCES/sap-preconfigure-d065073dca5617292d768ea0e044994653f84667.tar.gz

View File

@ -19,6 +19,7 @@ readme: README.md
authors:
- Bernd Finger <bfinger@redhat.com>
- Markus Koch <mkoch@redhat.com>
- Than Ngo <than@redhat.com>
### OPTIONAL but strongly recommended

View File

@ -1,185 +0,0 @@
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 }}"

View File

@ -1,57 +0,0 @@
diff -up sap-netweaver-preconfigure/tasks/main.yml.me sap-netweaver-preconfigure/tasks/main.yml
--- sap-netweaver-preconfigure/tasks/main.yml.me 2021-07-16 20:47:31.917915614 +0200
+++ sap-netweaver-preconfigure/tasks/main.yml 2021-07-16 20:49:14.545505014 +0200
@@ -7,7 +7,7 @@
- name: Include os specific vars
include_vars: '{{ item }}'
with_first_found:
- - '{{ ansible_distibution }}_{{ ansible_distribution_version }}.yml'
+ - '{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml'
- '{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yml'
- '{{ ansible_os_family }}.yml'
diff -up sap-netweaver-preconfigure/vars/RedHat_9.yml.me sap-netweaver-preconfigure/vars/RedHat_9.yml
--- sap-netweaver-preconfigure/vars/RedHat_9.yml.me 2021-07-16 20:47:58.990334885 +0200
+++ sap-netweaver-preconfigure/vars/RedHat_9.yml 2021-07-16 20:48:15.158585284 +0200
@@ -0,0 +1,41 @@
+---
+
+# vars file for sap-netweaver-preconfigure
+
+__sap_netweaver_preconfigure_sapnotes:
+ - "2526952"
+
+__sap_netweaver_preconfigure_packages:
+ - tuned-profiles-sap
+
+__sap_netweaver_preconfigure_min_swap_space_mb: '20480'
+
+__sap_netweaver_preconfigure_adobe_doc_services_packages:
+ - autoconf.noarch
+ - automake.noarch
+ - cyrus-sasl.x86_64
+ - expat.x86_64
+ - fontconfig.x86_64
+ - glibc-devel.i686
+ - keyutils-libs.x86_64
+ - krb5-libs.x86_64
+ - libcom_err.x86_64
+ - libidn2.x86_64
+ - libselinux.x86_64
+ - libssh2.x86_64
+ - libxcb.i686
+ - nspr.x86_64
+ - nss.x86_64
+ - nss-softokn.x86_64
+ - nss-softokn-freebl.x86_64
+ - nss-util.x86_64
+ - openldap.x86_64
+ - openssl.x86_64
+ - zlib.x86_64
+ - libstdc++.i686
+ - libX11.i686
+ - libXau.i686
+ - glibc.i686
+ - libstdc++.i686
+ - libgcc.i686
+ - libuuid.i686

View File

@ -1,29 +0,0 @@
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:

View File

@ -23,10 +23,15 @@
%global collection_name linux
%endif
%global mainid ec364d2e0bd422b69f34871a1188114f368097a0
%global gitcommit_sap 9bed558b55cedc8939f6b3d4436436a6aaaf095c
%global gitcommit_sap_hana 9f22b540bc41e2d10fbc1250b36a7ef08129feb2
%global gitcommit_sap_netweaver 337ba5580ba862e1adac59dcda8a126cdf561225
# collection_version has to be increased by every rebuild
# otherwise, it cannot be uploaded to Automation Hub and Galaxy
# due to version conflict
%define collection_version 3.1.4
%global mainid 411f58b0e8da72cd69827d6ed30d8925bea5cb23
%global gitcommit_sap d065073dca5617292d768ea0e044994653f84667
%global gitcommit_sap_hana 083387e3af7f4eba1b3b9eabeaaf0bf66c97a96b
%global gitcommit_sap_netweaver bf771416116b670ccf17f8e289adbe14df20208b
%global rolename1 sap-preconfigure
%global rolename2 sap-hana-preconfigure
%global rolename3 sap-netweaver-preconfigure
@ -35,7 +40,7 @@
Name: %{package_name}
Summary: System Roles to configure RHEL for running SAP NetWeaver- or SAP HANA-based products
Version: 3.1.1
Release: 4%{?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,12 +50,9 @@ 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
BuildArch: noarch
@ -82,10 +84,8 @@ Requires: python-netaddr
BuildRequires: ansible >= 2.9.10
%endif
%global collection_version %{version}
%if %{undefined __ansible_provides}
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{collection_version}
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{version}
%endif
# be compatible with the usual Fedora Provides:
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release}
@ -105,7 +105,7 @@ Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{vers
# Simply copy everything instead of galaxy-installing the built artifact.
%define ansible_collection_install() mkdir -p %{buildroot}%{ansible_collection_files}; cp -a . %{buildroot}%{ansible_collection_files}/%{collection_name}/
%else
%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz
%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%endif
%endif
@ -118,7 +118,7 @@ to applicable SAP notes so that any SAP software can be installed.
Summary: Collection artifact to import to Automation Hub / Ansible Galaxy
%description collection-artifact
Collection artifact for %{name}. This package contains %{collection_namespace}-%{collection_name}-%{version}.tar.gz
Collection artifact for %{name}. This package contains %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%endif
%prep
@ -132,18 +132,16 @@ mv sap-netweaver-preconfigure-%{gitcommit_sap_netweaver} sap-netweaver-preconfig
# cp own galaxy.yml and rename the collection name correctly for Automation Hub and Galaxy
mkdir .collections
cp %{SOURCE5} galaxy.yml
sed -i -e 's|name: rhel|name: %{collection_name}|' galaxy.yml
sed -i -e "s|name: rhel|name: %{collection_name}|" galaxy.yml
# add correct version for Automation Hub and Galaxy
sed -i -e "s|version: 3.1.1|version: %{collection_version}|" galaxy.yml
pushd sap-preconfigure
%patch1 -p1
popd
pushd sap-hana-preconfigure
%patch50 -p1
%patch51 -p1
popd
pushd sap-netweaver-preconfigure
%patch100 -p1
popd
# remove git stuff
@ -198,8 +196,7 @@ done
# removing dot files/dirs
rm -rf .collections/ansible_collections/%{collection_namespace}/%{collection_name}/.[A-Za-z]*
cp -p galaxy.yml lsr_role2collection/.ansible-lint \
.collections/ansible_collections/%{collection_namespace}/%{collection_name}
cp -p galaxy.yml .collections/ansible_collections/%{collection_namespace}/%{collection_name}
# build collection file
cd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
@ -225,10 +222,7 @@ popd
%if %{with collection_artifact}
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
if [ -f %{collection_namespace}-%{collection_name}-%{version}.tar.gz ]; then
mv %{collection_namespace}-%{collection_name}-%{version}.tar.gz \
$RPM_BUILD_ROOT%{_datadir}/ansible/collections/
fi
mv %{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz $RPM_BUILD_ROOT%{_datadir}/ansible/collections/
popd
%endif
@ -246,10 +240,27 @@ popd
%if %{with collection_artifact}
%files collection-artifact
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{version}.tar.gz
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{collection_version}.tar.gz
%endif
%changelog
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-10
- Related: #2016858, increase release to avoid update conflict
* Fri Dec 03 2021 Than Ngo <than@redhat.com> - 3.1.1-8
- Related: #2016858, rebase
* Tue Nov 16 2021 Than Ngo <than@redhat.com> - 3.1.1-7
- Resolves: #2016858, ansible-lint cleanup
* Wed Sep 08 2021 Than Ngo <than@redhat.com> - 3.1.1-6
- set min kernel version for RHEL 8.4 x86_64
- use grubby for setting tsx=on
- add tsx=on to the kernel command line unconditionally
* Wed Sep 01 2021 Than Ngo <than@redhat.com> - 3.1.1-5
- Related: #1928398, fix yum group install errors on RHEL 7
* Fri Aug 20 2021 Than Ngo <than@redhat.com> - 3.1.1-4
- Related: #1928398, fix #149, #177, #193, #194