diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2018-12-20 13:40:16 -0500 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-03-19 18:50:28 +0000 |
commit | 7b4feb6e9158c21cb111e4e2bbd406e327faa3aa (patch) | |
tree | 3e03d8707ea7094d823f06f22c438c693cd4521e | |
parent | 41b59818189822371217eb646042917c6eb4b263 (diff) | |
download | sos-7b4feb6e9158c21cb111e4e2bbd406e327faa3aa.tar.gz |
[redhat] Add a 'cantboot' preset
Adds a 'cantboot' preset to enable a small number of plugins that may be
useful when troubleshooting a situation in which normal system startup
is failing.
Longer term, it would be beneficial if this preset could be
automatically loaded if sos detects that it is running in a system that
has been booted to rescue/emergency mode.
Resolves: #1522
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/policies/redhat.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py index 53f5d127..15915dc3 100644 --- a/sos/policies/redhat.py +++ b/sos/policies/redhat.py @@ -195,6 +195,9 @@ _opts_all_logs = SoSOptions(all_logs=True) _opts_all_logs_verify = SoSOptions(all_logs=True, verify=True) _opts_all_logs_no_lsof = SoSOptions(all_logs=True, plugopts=['process.lsof=off']) +_cb_plugs = ['abrt', 'block', 'boot', 'dnf', 'dracut', 'filesys', 'grub2', + 'hardware', 'host', 'kernel', 'logs', 'lvm2', 'memory', 'rpm', + 'process', 'systemd', 'yum', 'xfs'] RHEL_RELEASE_STR = "Red Hat Enterprise Linux" @@ -213,6 +216,11 @@ RHOCP_DESC = "OpenShift Container Platform by Red Hat" RH_SATELLITE = "satellite" RH_SATELLITE_DESC = "Red Hat Satellite" +CB = "cantboot" +CB_DESC = "For use when normal system startup fails" +CB_OPTS = SoSOptions(verify=True, all_logs=True, onlyplugins=_cb_plugs) +CB_NOTE = ("Data collection will be limited to a boot-affecting scope") + NOTE_SIZE = "This preset may increase report size" NOTE_TIME = "This preset may increase report run time" NOTE_SIZE_TIME = "This preset may increase report size and run time" @@ -227,6 +235,7 @@ rhel_presets = { opts=_opts_all_logs_verify), RH_SATELLITE: PresetDefaults(name=RH_SATELLITE, desc=RH_SATELLITE_DESC, note=NOTE_TIME, opts=_opts_verify), + CB: PresetDefaults(name=CB, desc=CB_DESC, note=CB_NOTE, opts=CB_OPTS) } # Legal disclaimer text for Red Hat products |