From b350e34bc175a56eb8b941ae7e3c89b2d876ea48 Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Fri, 26 Jun 2020 12:29:09 -0400 Subject: [global] Update config file location and layout Moves the default config file we look for to /etc/sos/sos.conf instead of /etc/sos.conf. Extends the config file to look for a section matching the name of the component being used. Renames the "general" section to "global" and the "tunables" section to "plugin_options". Updates the default sos.conf to this style and adds some comments to the file. Update the man page for sos.conf. Note that this commit does NOT update sos.spec to drop the default configuration file in the new location, as that will be handled by a later commit to update the specfile wholesale. Closes: #2125 Resolves: #2136 Signed-off-by: Jake Hunsaker --- man/en/sos.conf.5 | 44 ++++++++++++----------- sos.conf | 33 ++++++++++++++--- sos/__init__.py | 4 ++- sos/component.py | 48 +++++++++++++++++++++---- sos/options.py | 97 ++++++++++++++++++++++++++------------------------ sos/report/__init__.py | 42 +++++++++++----------- 6 files changed, 169 insertions(+), 99 deletions(-) diff --git a/man/en/sos.conf.5 b/man/en/sos.conf.5 index 2d2386f7..248af60c 100644 --- a/man/en/sos.conf.5 +++ b/man/en/sos.conf.5 @@ -3,11 +3,11 @@ sos.conf \- sosreport configuration .SH DESCRIPTION .sp -sosreport uses a configuration file at /etc/sos.conf. +sosreport uses a configuration file at /etc/sos/sos.conf. .SH PARAMETERS .sp -There are three sections in the sosreport configuration file: -general, plugins and tunables. Options are set using 'ini'-style +There are sections for each sos component, as well as global values and +those for plugin options. Options are set using 'ini'-style \fBname = value\fP pairs. Disabling/enabling a boolean option is done the same way like on command line (e.g. process.lsof=off). @@ -18,30 +18,30 @@ will result in enabling those options, regardless of value set. Sections are parsed in the ordering: .br -- \fB[general]\fP +- \fB[global]\fP .br -- \fB[plugins]\fP (disable) +- \fB[component]\fP .br -- \fB[plugins]\fP (enable) -.br -- \fB[tunables]\fP +- \fB[plugin_options]\fP .TP -\fB[general]\fP +\fB[global]\fP