diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2019-11-11 12:43:01 -0500 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2019-11-11 14:31:51 -0500 |
commit | 87dbc4d961d9e98f4e8b7b54010800ff3bdb5a73 (patch) | |
tree | 1afd87413327f0d4f3b152de4a502c576aba1bd9 /po/Makefile | |
parent | 1fd194191a56c51052f0c24ddeb3bbf9088ae0ca (diff) | |
download | sos-87dbc4d961d9e98f4e8b7b54010800ff3bdb5a73.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>
Diffstat (limited to 'po/Makefile')
0 files changed, 0 insertions, 0 deletions