diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2019-11-12 18:58:05 +0100 |
---|---|---|
committer | Pavel Moravec <pmoravec@redhat.com> | 2019-11-12 18:58:05 +0100 |
commit | edf11652ed9c069996b2e4744520294092d32778 (patch) | |
tree | 1afd87413327f0d4f3b152de4a502c576aba1bd9 /sos.conf | |
parent | 1fd194191a56c51052f0c24ddeb3bbf9088ae0ca (diff) | |
parent | 87dbc4d961d9e98f4e8b7b54010800ff3bdb5a73 (diff) | |
download | sos-edf11652ed9c069996b2e4744520294092d32778.tar.gz |
[Plugin|Policy] Only call lsmod once and standardize kmod checks
This commit makes two changes to how sos deals with kernel modules and
their state during a run of sosreport.
First, no longer call `lsmod` for every individual plugin during its
enablement check. Instead, call `lsmod` only once during `Policy`
initialization, and cache the output for later checks.
Second, have `Plugin.is_module_loaded()` check for kmod presence in the
saved policy class attr for kernel_mods, rather than checking through
`/proc/modules`. Have the plugin enablement checks now also use
`is_module_loaded()` to standardize with how `SoSPredicate`s are
checked.
Note that this change results in a significant performance increase for
sos initialization times in a RHEL 7 container.
Resolves: #1854
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Diffstat (limited to 'sos.conf')
0 files changed, 0 insertions, 0 deletions