diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | sos/plugins/__init__.py | 7 | ||||
-rw-r--r-- | sos/plugins/anacron.py | 3 | ||||
-rw-r--r-- | sos/plugins/distupgrade.py | 2 | ||||
-rw-r--r-- | sos/plugins/dmraid.py | 16 | ||||
-rw-r--r-- | sos/plugins/kvm.py | 4 | ||||
-rw-r--r-- | sos/plugins/openstack_nova.py | 16 | ||||
-rw-r--r-- | sos/plugins/powerpc.py | 3 | ||||
-rw-r--r-- | sos/utilities.py | 1 |
9 files changed, 32 insertions, 21 deletions
@@ -19,6 +19,7 @@ Jeremy Agee <jagee@redhat.com> Jesse Jaggars <jjaggars@redhat.com> Joey Boggs <jboggs@redhat.com> John Berninger <jwb@redhat.com> +Jorge Niedbalski <jnr@metaklass.org> Justin Payne <jpayne@redhat.com> Keith Kearnan <kearnan_keith@emc.com> Kent Lamb <klamb@redhat.com> diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index a599c714..6cac31c4 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -647,10 +647,11 @@ class Plugin(object): return True def setup(self): - """This method must be overridden to add the copy_specs, forbidden_paths, - and external programs to be collected at a minimum. + """Collect the list of files declared by the plugin. This method + may be overridden to add further copy_specs, forbidden_paths, and + external programs if required. """ - pass + self.add_copy_specs(list(self.files)) def postproc(self): """ diff --git a/sos/plugins/anacron.py b/sos/plugins/anacron.py index 60efa27b..a5635355 100644 --- a/sos/plugins/anacron.py +++ b/sos/plugins/anacron.py @@ -25,7 +25,4 @@ class Anacron(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): # just look for the configuration file which is common files = ('/etc/anacrontab',) - def setup(self): - self.add_copy_specs(list(self.files)) - # vim: et ts=4 sw=4 diff --git a/sos/plugins/distupgrade.py b/sos/plugins/distupgrade.py index d618dfc6..8bc44c23 100644 --- a/sos/plugins/distupgrade.py +++ b/sos/plugins/distupgrade.py @@ -24,8 +24,6 @@ class DistUpgrade(Plugin): files = None - def setup(self): - self.add_copy_specs(list(self.files)) class RedHatDistUpgrade(DistUpgrade, RedHatPlugin): diff --git a/sos/plugins/dmraid.py b/sos/plugins/dmraid.py index 12613b5c..4061cf28 100644 --- a/sos/plugins/dmraid.py +++ b/sos/plugins/dmraid.py @@ -19,11 +19,25 @@ class Dmraid(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): """dmraid related information """ + option_list = [( + "metadata", "capture metadata from dmraid devices", "slow", False + )] + plugin_name = 'dmraid' - dmraid_options = ['V','b','r','s','tay','rD'] + # V - {-V/--version} + # b - {-b|--block_devices} + # r - {-r|--raid_devices} + # s - {-s|--sets} + # t - [-t|--test] + # a - {-a|--activate} {y|n|yes|no} + # D - [-D|--dump_metadata] + dmraid_options = ['V','b','r','s','tay'] def setup(self): for opt in self.dmraid_options: self.add_cmd_output("dmraid -%s" % (opt,)) + if self.get_option("metadata"): + metadata_path = self.get_cmd_output_path("metadata") + self.add_cmd_output("dmraid -rD", runat=metadata_path) # vim: et ts=4 sw=4 diff --git a/sos/plugins/kvm.py b/sos/plugins/kvm.py index ad656bce..c7d34790 100644 --- a/sos/plugins/kvm.py +++ b/sos/plugins/kvm.py @@ -37,7 +37,7 @@ class Kvm(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): "/sys/module/kvm_amd/srcversion", "/sys/module/ksm/srcversion" ]) - if not os.path.ismount(debugfs_path): + if not os.path.ismount(self.debugfs_path): self._debugfs_cleanup = True r = self.call_ext_prog("mount -t debugfs debugfs %s" % self.debugfs_path) @@ -48,7 +48,7 @@ class Kvm(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): self.add_cmd_output("kvm_stat --once") def postproc(self): - if self._debugfs_cleanup and os.path.ismount(debugfs_path): + if self._debugfs_cleanup and os.path.ismount(self.debugfs_path): r = self.call_ext_prog("umount %s" % self.debugfs_path) self.log_error("could not unmount %s" % self.debugfs_path) diff --git a/sos/plugins/openstack_nova.py b/sos/plugins/openstack_nova.py index 1e95af0c..9f0fd8b2 100644 --- a/sos/plugins/openstack_nova.py +++ b/sos/plugins/openstack_nova.py @@ -30,28 +30,28 @@ class OpenStackNova(Plugin): def setup(self): if self.option_enabled("cmds"): self.add_cmd_output( - "nova-manage config list 2>/dev/null | sort", + "nova-manage config list", suggest_filename="nova_config_list") self.add_cmd_output( - "nova-manage service list 2>/dev/null", + "nova-manage service list", suggest_filename="nova_service_list") self.add_cmd_output( - "nova-manage db version 2>/dev/null", + "nova-manage db version", suggest_filename="nova_db_version") self.add_cmd_output( - "nova-manage fixed list 2>/dev/null", + "nova-manage fixed list", suggest_filename="nova_fixed_ip_list") self.add_cmd_output( - "nova-manage floating list 2>/dev/null", + "nova-manage floating list", suggest_filename="nova_floating_ip_list") self.add_cmd_output( - "nova-manage flavor list 2>/dev/null", + "nova-manage flavor list", suggest_filename="nova_flavor_list") self.add_cmd_output( - "nova-manage network list 2>/dev/null", + "nova-manage network list", suggest_filename="nova_network_list") self.add_cmd_output( - "nova-manage vm list 2>/dev/null", + "nova-manage vm list", suggest_filename="nova_vm_list") if self.option_enabled("log"): diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py index dfa1dec9..3e78efbc 100644 --- a/sos/plugins/powerpc.py +++ b/sos/plugins/powerpc.py @@ -81,7 +81,8 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): if isPowerNV: self.add_copy_specs([ "/proc/ppc64/", - "/sys/kernel/debug/powerpc/" + "/sys/kernel/debug/powerpc/", + "/sys/firmware/opal/msglog" ]) if os.path.isdir("/var/log/dump"): self.add_cmd_output("ls -l /var/log/dump") diff --git a/sos/utilities.py b/sos/utilities.py index edcc0ed5..6e577126 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -28,7 +28,6 @@ import inspect from stat import * #from itertools import * from subprocess import Popen, PIPE, STDOUT -import logging import zipfile import tarfile import hashlib |