diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2018-02-16 15:53:14 -0500 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-05-09 15:07:02 +0100 |
commit | 790c59045354b80be180f03d6534a8b66811450a (patch) | |
tree | 044699edeeb32655ebcaf16ab9ee009d011d1ff9 | |
parent | 8f6657f8a2bf04f249d771ec83543b918e03b8b2 (diff) | |
download | sos-790c59045354b80be180f03d6534a8b66811450a.tar.gz |
[rpm] add option for rpm DB
Adds the rpmdb option, disabled by default, to collect the contents of
/var/lib/rpm to diagnose RPM DB problems. Users should note that use of
this option will typically significantly increase the size of the final
sosreport archive.
Resolves: #1217
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/rpm.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py index a04cd30d..b6dae739 100644 --- a/sos/plugins/rpm.py +++ b/sos/plugins/rpm.py @@ -13,6 +13,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from sos.plugins import Plugin, RedHatPlugin +from sos.utilities import is_executable class Rpm(Plugin, RedHatPlugin): @@ -24,7 +25,8 @@ class Rpm(Plugin, RedHatPlugin): option_list = [("rpmq", "queries for package information via rpm -q", "fast", True), - ("rpmva", "runs a verify on all packages", "slow", False)] + ("rpmva", "runs a verify on all packages", "slow", False), + ("rpmdb", "collect /var/lib/rpm", "slow", False)] verify_packages = ('rpm',) @@ -61,4 +63,9 @@ class Rpm(Plugin, RedHatPlugin): self.add_cmd_output("rpm -Va", root_symlink="rpm-Va", timeout=180) + if self.get_option("rpmdb"): + self.add_cmd_output("lsof +D /var/lib/rpm", + suggest_filename='lsof_D_var_lib_rpm') + self.add_copy_spec("/var/lib/rpm") + # vim: set et ts=4 sw=4 : |