1
0
forked from rpms/sos

import CS sos-4.6.0-2.el8

This commit is contained in:
eabdullin 2023-09-27 14:13:23 +00:00
parent fb8481ebed
commit bb343301c0
4 changed files with 195 additions and 10 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/sos-4.5.0.tar.gz SOURCES/sos-4.6.0.tar.gz
SOURCES/sos-audit-0.3.tgz SOURCES/sos-audit-0.3.tgz

View File

@ -1,2 +1,2 @@
d5e166c75250aef01c86a3a9d8c9fcc8db335f4e SOURCES/sos-4.5.0.tar.gz 90d8b664a4e0593d60357342bb5f73af9908e29d SOURCES/sos-4.6.0.tar.gz
9d478b9f0085da9178af103078bbf2fd77b0175a SOURCES/sos-audit-0.3.tgz 9d478b9f0085da9178af103078bbf2fd77b0175a SOURCES/sos-audit-0.3.tgz

View File

@ -0,0 +1,126 @@
From 43714aa5aeb3dcb0dec17dd026ca5c394cc06afd Mon Sep 17 00:00:00 2001
From: Periyasamy Palanisamy <pepalani@redhat.com>
Date: Fri, 11 Aug 2023 14:30:42 +0200
Subject: [PATCH] Collect additional ovnkube node logs
With Interconnect support in latest OVN-Kubernetes, ovnkube-nodes
logs grew large. This commit adds the ability to collect those
additional logs.
Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
---
sos/report/plugins/openshift_ovn.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sos/report/plugins/openshift_ovn.py b/sos/report/plugins/openshift_ovn.py
index d81fc97aa..2d804e9ae 100644
--- a/sos/report/plugins/openshift_ovn.py
+++ b/sos/report/plugins/openshift_ovn.py
@@ -30,7 +30,8 @@ def setup(self):
# Collect ovn interconnect specific files if exists.
self.add_copy_spec([
"/var/lib/ovn-ic/etc/ovnnb_db.db",
- "/var/lib/ovn-ic/etc/ovnsb_db.db"
+ "/var/lib/ovn-ic/etc/ovnsb_db.db",
+ "/var/lib/ovn-ic/etc/libovsdb*log*"
])
# The ovn cluster/status is not valid anymore for interconnect setup.
From e11a594f942f9ae98aeb644c573293b391050657 Mon Sep 17 00:00:00 2001
From: Periyasamy Palanisamy <pepalani@redhat.com>
Date: Tue, 15 Aug 2023 11:47:20 +0200
Subject: [PATCH] Collect ovn logs as much as possible
The sosreport limits to collect logs at maximum of 25 MB in a given
collection passed into add_copy_spec method. so this may lead into
logs wouldn't have fully collected when user collected sos report
without --all-logs option.
Hence this commit ensures logs and dbs collected as much as possible
when --all-logs option is not specified.
Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
---
sos/report/plugins/openshift_ovn.py | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/sos/report/plugins/openshift_ovn.py b/sos/report/plugins/openshift_ovn.py
index 2d804e9ae..347b15eea 100644
--- a/sos/report/plugins/openshift_ovn.py
+++ b/sos/report/plugins/openshift_ovn.py
@@ -20,19 +20,28 @@ class OpenshiftOVN(Plugin, RedHatPlugin):
profiles = ('openshift',)
def setup(self):
+ all_logs = self.get_option("all_logs")
+
self.add_copy_spec([
"/var/lib/ovn/etc/ovnnb_db.db",
"/var/lib/ovn/etc/ovnsb_db.db",
- "/var/lib/openvswitch/etc/keys",
- "/var/log/openvswitch/libreswan.log",
- "/var/log/openvswitch/ovs-monitor-ipsec.log"
- ])
- # Collect ovn interconnect specific files if exists.
+ "/var/lib/openvswitch/etc/keys"
+ ], sizelimit=300)
+
+ # Collect ovn interconnect specific db files if exists.
self.add_copy_spec([
"/var/lib/ovn-ic/etc/ovnnb_db.db",
- "/var/lib/ovn-ic/etc/ovnsb_db.db",
- "/var/lib/ovn-ic/etc/libovsdb*log*"
- ])
+ "/var/lib/ovn-ic/etc/ovnsb_db.db"
+ ], sizelimit=300)
+
+ # Collect libovsdb logs in case of ovn interconnect setup.
+ if not all_logs:
+ self.add_copy_spec([
+ "/var/lib/ovn-ic/etc/libovsdb.log",
+ "/var/lib/ovn-ic/etc/libovsdb*log.gz"
+ ], sizelimit=100)
+ else:
+ self.add_copy_spec("/var/lib/ovn-ic/etc/libovsdb*log*")
# The ovn cluster/status is not valid anymore for interconnect setup.
self.add_cmd_output([
From 7cd6f61fd15ae7fc93d62cca927204351cdc1322 Mon Sep 17 00:00:00 2001
From: Periyasamy Palanisamy <pepalani@redhat.com>
Date: Wed, 30 Aug 2023 09:56:40 +0200
Subject: [PATCH] Collect logs from ovnkube-controller container
This enables ovn sos report plugin to collect logs ovnkube-controller
container because ovn-kubernetes now provides option to run both
ovnkube-node and ovnkube-controller in same container with this
PR https://github.com/ovn-org/ovn-kubernetes/pull/3807.
Signed-off-by: Periyasamy Palanisamy <pepalani@redhat.com>
---
sos/report/plugins/openshift_ovn.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sos/report/plugins/openshift_ovn.py b/sos/report/plugins/openshift_ovn.py
index 347b15eea..cb48057d3 100644
--- a/sos/report/plugins/openshift_ovn.py
+++ b/sos/report/plugins/openshift_ovn.py
@@ -16,7 +16,8 @@ class OpenshiftOVN(Plugin, RedHatPlugin):
"""
short_desc = 'Openshift OVN'
plugin_name = "openshift_ovn"
- containers = ('ovnkube-master', 'ovnkube-node', 'ovn-ipsec')
+ containers = ('ovnkube-master', 'ovnkube-node', 'ovn-ipsec',
+ 'ovnkube-controller')
profiles = ('openshift',)
def setup(self):
@@ -54,6 +55,10 @@ def setup(self):
'ovs-appctl -t /var/run/ovn/ovn-controller.*.ctl ' +
'ct-zone-list'],
container='ovnkube-node')
+ self.add_cmd_output([
+ 'ovs-appctl -t /var/run/ovn/ovn-controller.*.ctl ' +
+ 'ct-zone-list'],
+ container='ovnkube-controller')
# Collect ovs ct-zone-list directly on host for interconnect setup.
self.add_cmd_output([
'ovs-appctl -t /var/run/ovn-ic/ovn-controller.*.ctl ' +

View File

@ -4,26 +4,25 @@
Summary: A set of tools to gather troubleshooting information from a system Summary: A set of tools to gather troubleshooting information from a system
Name: sos Name: sos
Version: 4.5.0 Version: 4.6.0
Release: 1%{?dist} Release: 2%{?dist}
Group: Applications/System Group: Applications/System
Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz Source0: https://github.com/sosreport/sos/archive/%{version}/sos-%{version}.tar.gz
Source1: sos-audit-%{auditversion}.tgz Source1: sos-audit-%{auditversion}.tgz
License: GPLv2+ License: GPL-2.0-or-later
BuildArch: noarch BuildArch: noarch
Url: https://github.com/sosreport/sos Url: https://github.com/sosreport/sos
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: gettext BuildRequires: gettext
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
Requires: bzip2
Requires: xz
Requires: python3-requests Requires: python3-requests
Requires: python3-setuptools
Recommends: python3-magic Recommends: python3-magic
Recommends: python3-pexpect Recommends: python3-pexpect
Recommends: python3-pyyaml Recommends: python3-pyyaml
Conflicts: vdsm < 4.40 Conflicts: vdsm < 4.40
Obsoletes: sos-collector Obsoletes: sos-collector
Patch1: sos-SUPDEV145-ovnkube-logs.patch
%description %description
Sos is a set of tools that gathers information about system Sos is a set of tools that gathers information about system
@ -34,6 +33,7 @@ support technicians and developers.
%prep %prep
%setup -qn %{name}-%{version} %setup -qn %{name}-%{version}
%setup -T -D -a1 -q %setup -T -D -a1 -q
%patch1 -p1
%build %build
@ -41,8 +41,11 @@ support technicians and developers.
%install %install
%py3_install '--install-scripts=%{_sbindir}' %py3_install '--install-scripts=%{_sbindir}'
rm -f %{buildroot}/usr/config/sos.conf
rm -f %{buildroot}/usr/config/tmpfilesd-sos-rh.conf
install -Dm644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf install -Dm644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
install -d -m 755 %{buildroot}%{_sysconfdir}/tmpfiles.d/
install -m 644 tmpfiles/tmpfilesd-sos-rh.conf %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
%find_lang %{name} || echo 0 %find_lang %{name} || echo 0
@ -61,6 +64,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/sos/{cleaner,presets.d,extras.d,groups.d}
%dir /etc/sos/presets.d %dir /etc/sos/presets.d
%dir /etc/sos/extras.d %dir /etc/sos/extras.d
%dir /etc/sos/groups.d %dir /etc/sos/groups.d
/etc/tmpfiles.d/%{name}.conf
%{python3_sitelib}/* %{python3_sitelib}/*
%{_mandir}/man1/sosreport.1.gz %{_mandir}/man1/sosreport.1.gz
%{_mandir}/man1/sos-clean.1.gz %{_mandir}/man1/sos-clean.1.gz
@ -75,7 +79,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/sos/{cleaner,presets.d,extras.d,groups.d}
%license LICENSE %license LICENSE
%config(noreplace) %{_sysconfdir}/sos/sos.conf %config(noreplace) %{_sysconfdir}/sos/sos.conf
%config(noreplace) %{_sysconfdir}/sos/cleaner %config(noreplace) %{_sysconfdir}/sos/cleaner
%config /usr/config/sos.conf
%package audit %package audit
Summary: Audit use of some commands for support purposes Summary: Audit use of some commands for support purposes
@ -104,6 +107,62 @@ of the system. Currently storage and filesystem commands are audited.
%ghost /etc/audit/rules.d/40-sos-storage.rules %ghost /etc/audit/rules.d/40-sos-storage.rules
%changelog %changelog
* Fri Sep 01 2023 Pavel Moravec <pmoravec@redhat.com> = 4.6.0-2
- [openshift_ovn] Collect additional ovnkube node logs
Resolves: SUPDEV145
* Wed Aug 23 2023 Jan Jansky <jjansky@redhat.com> = 4.6.0-1
- [cleaner] Use data filter for extraction
Resolves: bz2218873
* Thu Jul 27 2023 Pavel Moravec <pmoravec@redhat.com> = 4.5.6-1
- Rebase sos to 4.5.6
Resolves: bz2226724
* Fri Jul 14 2023 Jan Jansky <jjansky@redhat.com> = 4.5.5-2
- Adding patch for mac obfuscation
Resolves: bz2218279
Resolves: bz2216608
Resolves: bz2207562
* Mon Jul 03 2023 Jan Jansky <jjansky@redhat.com> = 4.5.5-1
- [clean] Respect permissions of sanitised files
Resolves: bz2218279
- [plugin] Fix exception when calling os.makedirs
Resolves: bz2216608
- [cleaner] Enhance trailing characters list after AMC address
Resolves: bz2207562
* Thu Jun 01 2023 Pavel Moravec <pmoravec@redhat.com> = 4.5.4-1
- [plugins] collect strings before commands
Resolves: bz2203141
- [collector] collect report from primary node if in node_list
Resolves: bz2186460
- [powerpc] collect invscout logs
Resolves: bz2210543
- [rhc] New plugin for RHC
Resolves: bz2196649
* Fri May 05 2023 Jan Jansky <jjansky@redhat.com> = 4.5.3-1
- [report] Ignore case when scrubbing via do_file_sub
Resolves: bz2143272
- [subscription_manager] Scrub proxy passwords from repo_server_val
Resolves: bz2177282
- [virsh] Scrub passwords in virt-manager logs
Resolves: bz2184062
* Wed Mar 08 2023 Pavel Moravec <pmoravec@redhat.com> = 4.5.1-3
- Rebase on upstream 4.5.1
Resolves: bz2175806
- [composer] Capure /etc/osbuild-composer file
Resolves: bz2169776
- [ostree] Collect "ostree fsck" under plugin specific opt
Resolves: bz2161533
- [iprconfig] guard whole plugin by sg kmod predicate
Resolves: bz2176086
- [cleaner] dont clean sys_tmp from final_path
Resolves: bz2176218
* Tue Feb 07 2023 Pavel Moravec <pmoravec@redhat.com> = 4.5.0-1 * Tue Feb 07 2023 Pavel Moravec <pmoravec@redhat.com> = 4.5.0-1
- Rebase on upstream 4.5.0 - Rebase on upstream 4.5.0
Resolves: bz2082614 Resolves: bz2082614