aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaria Bukharina <d.bukharina@yadro.com>2020-11-30 16:45:15 +0300
committerJake Hunsaker <jhunsake@redhat.com>2020-12-02 16:29:28 -0500
commit3fddddf8ea14436afdffadfb679411e03bf1ec61 (patch)
treebe4f96bb894f4195a12ec6b555d009c6ea62241f
parentfcd9410bcfcb2c1f1d565fb62f6348bf9d5310e0 (diff)
downloadsos-3fddddf8ea14436afdffadfb679411e03bf1ec61.tar.gz
[fibrechannel] Add optional argument for plugin to collect debug info
Add a possibility to enable collecting debug logs from vendor specific paths. To enable this feature you need to pass optional `debug` argument. Resolves: #2324 Signed-off-by: Daria Bukharina d.bukharina@yadro.com Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/fibrechannel.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/sos/report/plugins/fibrechannel.py b/sos/report/plugins/fibrechannel.py
index e3ca97e8..fc871e0d 100644
--- a/sos/report/plugins/fibrechannel.py
+++ b/sos/report/plugins/fibrechannel.py
@@ -18,8 +18,18 @@ class Fibrechannel(Plugin, RedHatPlugin):
plugin_name = 'fibrechannel'
profiles = ('hardware', 'storage', 'system')
files = ('/sys/class/fc_host', '/sys/class/fc_remote_ports')
+ option_list = [
+ ("debug", "enable debug logs", "fast", True)
+ ]
+
+ # vendor specific debug paths
+ debug_paths = [
+ '/sys/kernel/debug/qla2*/'
+ ]
def setup(self):
self.add_blockdev_cmd("udevadm info -a %(dev)s", devices='fibre')
+ if self.get_option('debug'):
+ self.add_copy_spec(self.debug_paths)
# vim: set et ts=4 sw=4 :