import sos-collector-1.8-2.el8

This commit is contained in:
CentOS Sources 2020-04-23 23:09:36 +00:00 committed by Andrew Lukoshko
commit 6dcb9f00a6
4 changed files with 203 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/sos-collector-1.8.tar.gz

1
.sos-collector.metadata Normal file
View File

@ -0,0 +1 @@
32b09cbab87d66d8b19f95db977c29f0fb828202 SOURCES/sos-collector-1.8.tar.gz

View File

@ -0,0 +1,76 @@
From ac9a24c90cdbaca79951854da1f37d8a10ac8cb9 Mon Sep 17 00:00:00 2001
From: Jake Hunsaker <jhunsake@redhat.com>
Date: Thu, 3 Oct 2019 11:58:04 -0400
Subject: [PATCH 1/2] [soscollector] Enable --all-logs option
The --all-logs option, while exposed via sos-collector, was not actually
being passed to sosreport on the remote nodes.
Now --all-logs is properly passed to sosreport as intended.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
---
soscollector/sos_collector.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/soscollector/sos_collector.py b/soscollector/sos_collector.py
index 19dc368..55cd0ae 100644
--- a/soscollector/sos_collector.py
+++ b/soscollector/sos_collector.py
@@ -502,6 +502,8 @@ this utility or remote systems that it connects to.
quote(self.config['case_id']))
if self.config['alloptions']:
self.config['sos_cmd'] += ' --alloptions'
+ if self.config['all_logs']:
+ self.config['sos_cmd'] += ' --all-logs'
if self.config['verify']:
self.config['sos_cmd'] += ' --verify'
if self.config['log_size']:
--
2.21.0
From 0f599189909a6f07e148e68aeee7048c12808e37 Mon Sep 17 00:00:00 2001
From: Jake Hunsaker <jhunsake@redhat.com>
Date: Thu, 3 Oct 2019 11:54:18 -0400
Subject: [PATCH 2/2] [soscollector] Revert temp directory to /var/tmp
A previous commit inadvertantly changed the default temp directory to be
created under /tmp instead of /var/tmp. This commit fixes that and
returns the default location to /var/tmp.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
---
soscollector/configuration.py | 2 +-
soscollector/sos_collector.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/soscollector/configuration.py b/soscollector/configuration.py
index 1c8baa1..c6f1ce3 100644
--- a/soscollector/configuration.py
+++ b/soscollector/configuration.py
@@ -45,7 +45,7 @@ class Configuration(dict):
self['ssh_key'] = None
self['sos_cmd'] = 'sosreport --batch'
self['no_local'] = False
- self['tmp_dir'] = None
+ self['tmp_dir'] = '/var/tmp'
self['out_dir'] = '/var/tmp/'
self['nodes'] = []
self['debug'] = False
diff --git a/soscollector/sos_collector.py b/soscollector/sos_collector.py
index 55cd0ae..93048d9 100644
--- a/soscollector/sos_collector.py
+++ b/soscollector/sos_collector.py
@@ -209,7 +209,7 @@ class SosCollector():
if self.config['verbose']:
self.console.debug(msg)
- def create_tmp_dir(self, location='/tmp'):
+ def create_tmp_dir(self, location='/var/tmp'):
'''Creates a temp directory to transfer sosreports to'''
tmpdir = tempfile.mkdtemp(prefix='sos-collector-', dir=location)
self.config['tmp_dir'] = tmpdir
--
2.21.0

125
SPECS/sos-collector.spec Normal file
View File

@ -0,0 +1,125 @@
Summary: Capture sosreports from multiple nodes simultaneously
Name: sos-collector
Version: 1.8
Release: 2%{?dist}
Source0: http://people.redhat.com/jhunsake/sos-collector/%{name}-%{version}.tar.gz
License: GPLv2
BuildArch: noarch
Url: https://github.com/sosreport/sos-collector
Requires: sos >= 3.0
Obsoletes: clustersos < 1.2.2-2
Provides: clustersos = %{version}-%{release}
Patch0: sos-collector-temp-location.patch
%if 0%{?rhel} == 7
BuildRequires: python-devel
Requires: python-futures
Requires: python-six
Requires: python-pexpect
%else
BuildRequires: python3-devel
BuildRequires: python3-six
BuildRequires: python3-pexpect
Requires: python3-six
Requires: python3-pexpect
%endif
%description
sos-collector is a utility designed to capture sosreports from multiple nodes
at once and collect them into a single archive. If the nodes are part of
a cluster, profiles can be used to configure how the sosreport command
is run on the nodes.
%prep
%setup -q
%patch0 -p1
%build
%if 0%{?rhel} == 7
%py2_build
%else
%py3_build
%endif
%install
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1
install -p -m644 man/en/sos-collector.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/
%if 0%{?rhel} == 7
%py2_install
%else
%py3_install
%endif
%check
%if 0%{?rhel} == 7
%{__python2} setup.py test
%else
%{__python3} setup.py test
%endif
%files
%{_bindir}/sos-collector
%if 0%{?rhel} == 7
%{python2_sitelib}/*
%else
%{python3_sitelib}/*
%endif
%{_mandir}/man1/*
%license LICENSE
%changelog
* Tue Jan 07 2020 Jake Hunsaker <jhunsake@redhat.com> - 1.8-2
- Resolves: RHBZ#1750756
* Mon Oct 14 2019 Jake Hunsaker <jhunsake@redhat.com> - 1.8-1
- Rebase to upstream 1.8
- Resolves: RHBZ#1751633
* Fri May 24 2019 Jake Hunsaker <jhunsake@redhat.com> - 1.7-5
- Fix local execution with pexpect
- Fix list output exception
* Thu May 02 2019 Jake Hunsaker <jhunsake@redhat.com> - 1.7-3
- Backport RHHI-V cluster profile
* Thu Apr 11 2019 Jake Hunsaker <jhunsake@redhat.com> - 1.7-2
- Fix 'none' cluster type enablement
- Update RHCOS image to RHEL 8 version
- Fix execution from within a container
* Mon Apr 01 2019 Jake Hunsaker <jhunsake@redhat.com> - 1.7-1
- New upstream release
- Overhaul mechanism of execution of sosreport in containers
- Added RHCOS support
- Added a 'none' cluster type
* Tue Dec 11 2018 Jake Hunsaker <jhunsake@redhat.com> - 1.6-1
- Drop paramiko dependency, use OpenSSH ControlPersist instead
- Layered cluster profiles can now accept base profile options
- Debian/Ubuntu hosts now supported
* Thu Oct 11 2018 Jake Hunsaker <jhunsake@redhat.com> - 1.5-1
- New upstream release
- Resolves CVE-2018-14650
* Fri Jun 22 2018 Jake Hunsaker <jhunsake@redhat.com> 1.4-1
- New upstream release
* Thu May 24 2018 Jake Hunsaker <jhunsake@redhat.com> 1.3-3
- Fix sos-collector archive organization
- Fix cluster option validation
* Mon May 07 2018 Jake Hunsaker <jhunsake@redhat.com> 1.3-2
- Fix collection of sosreport tarballs
* Fri Apr 27 2018 Jake Hunsaker <jhunsake@redhat.com> 1.3-1
- Reset versioning to continue from clustersos
* Thu Apr 26 2018 Jake Hunsaker <jhunsake@redhat.com> 1.0-1
- Renamed project to sos-collector
- Moved github repo to sosreport org