sos updates for 9.0 GA

fixup of wrong backport

Resolves: bz2023481

Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
This commit is contained in:
Pavel Moravec 2021-11-16 09:10:02 +01:00
parent b6c480a921
commit ce0a111147
2 changed files with 9 additions and 17 deletions

View File

@ -64,25 +64,17 @@ index 49f1af27..3e717993 100644
# get the option list into a dictionary # get the option list into a dictionary
for opt in self.option_list: for opt in self.option_list:
@@ -591,6 +583,22 @@ class Plugin(): @@ -591,6 +583,14 @@ class Plugin():
# Initialise the default --dry-run predicate # Initialise the default --dry-run predicate
self.set_predicate(SoSPredicate(self)) self.set_predicate(SoSPredicate(self))
+ def get_default_plugin_opts(self): + def get_default_plugin_opts(self):
+ return { + return [
+ 'timeout': PluginOpt( + ('timeout', 'Timeout in seconds for plugin to finish', 'fast', -1),
+ 'timeout', default=-1, val_type=int, + ('cmd-timeout', 'Timeout in seconds for a command', 'fast', -1),
+ desc='Timeout in seconds for plugin to finish all collections' + ('postproc', 'Enable post-processing collected plugin data', 'fast',
+ ), + True)
+ 'cmd-timeout': PluginOpt( + ]
+ 'cmd-timeout', default=-1, val_type=int,
+ desc='Timeout in seconds for individual commands to finish'
+ ),
+ 'postproc': PluginOpt(
+ 'postproc', default=True, val_type=bool,
+ desc='Enable post-processing of collected data'
+ )
+ }
+ +
def set_plugin_manifest(self, manifest): def set_plugin_manifest(self, manifest):
"""Pass in a manifest object to the plugin to write to """Pass in a manifest object to the plugin to write to

View File

@ -5,7 +5,7 @@
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.2 Version: 4.2
Release: 3%{?dist} Release: 4%{?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
@ -127,7 +127,7 @@ of the system. Currently storage and filesystem commands are audited.
%changelog %changelog
* Mon Nov 15 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-3 * Tue Nov 16 2021 Pavel Moravec <pmoravec@redhat.com> = 4.2-4
- [report] Calculate sizes of dirs, symlinks and manifest in - [report] Calculate sizes of dirs, symlinks and manifest in
Resolves: bz2011537 Resolves: bz2011537
- [report] shutdown threads for timeouted plugins - [report] shutdown threads for timeouted plugins