Blame SOURCES/sos-bz1491964-gluster-block-plugin.patch

084cc6
From 07e6ce3ee1f18a09fa8eaa77fc10729c970bf5f6 Mon Sep 17 00:00:00 2001
084cc6
From: vredara <redara@redhat.com>
084cc6
Date: Thu, 29 Jun 2017 00:36:37 +0530
084cc6
Subject: [PATCH] [gluster_block] Added new plugin gluster_block (#1041)
084cc6
084cc6
gluster_block plugin collects config/log files related to blocks
084cc6
084cc6
Signed-off-by: venkata edara <redara@redhat.com>
084cc6
Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
084cc6
---
084cc6
 sos/plugins/gluster_block.py | 39 +++++++++++++++++++++++++++++++++++++++
084cc6
 1 file changed, 39 insertions(+)
084cc6
 create mode 100644 sos/plugins/gluster_block.py
084cc6
084cc6
diff --git a/sos/plugins/gluster_block.py b/sos/plugins/gluster_block.py
084cc6
new file mode 100644
084cc6
index 0000000..39efbd7
084cc6
--- /dev/null
084cc6
+++ b/sos/plugins/gluster_block.py
084cc6
@@ -0,0 +1,39 @@
084cc6
+# This program is free software; you can redistribute it and/or modify
084cc6
+# it under the terms of the GNU General Public License as published by
084cc6
+# the Free Software Foundation; either version 2 of the License, or
084cc6
+# (at your option) any later version.
084cc6
+
084cc6
+# This program is distributed in the hope that it will be useful,
084cc6
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
084cc6
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
084cc6
+# GNU General Public License for more details.
084cc6
+
084cc6
+# You should have received a copy of the GNU General Public License along
084cc6
+# with this program; if not, write to the Free Software Foundation, Inc.,
084cc6
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
084cc6
+import glob
084cc6
+from sos.plugins import Plugin, RedHatPlugin
084cc6
+
084cc6
+
084cc6
+class GlusterBlock(Plugin, RedHatPlugin):
084cc6
+    """Gluster Block"""
084cc6
+
084cc6
+    plugin_name = 'gluster_block'
084cc6
+    profiles = ('storage',)
084cc6
+    packages = ("gluster-block",)
084cc6
+    files = ("/usr/sbin/gluster-block",)
084cc6
+
084cc6
+    def setup(self):
084cc6
+
084cc6
+        # collect logs - apply log_size for any individual file
084cc6
+        # all_logs takes precedence over logsize
084cc6
+        if not self.get_option("all_logs"):
084cc6
+            limit = self.get_option("log_size")
084cc6
+        else:
084cc6
+            limit = 0
084cc6
+
084cc6
+        if limit:
084cc6
+            for f in glob.glob("/var/log/gluster-block/*.log"):
084cc6
+                self.add_copy_spec(f, limit)
084cc6
+        else:
084cc6
+            self.add_copy_spec("/var/log/gluster-block")
084cc6
-- 
084cc6
2.7.5
084cc6
084cc6
From 9c3302597630e601213561b7f6dba8def0fcc448 Mon Sep 17 00:00:00 2001
084cc6
From: vredara <redara@redhat.com>
084cc6
Date: Thu, 29 Jun 2017 00:38:01 +0530
084cc6
Subject: [PATCH] [targetcli] added one item (#1044)
084cc6
084cc6
collecting the /sys/kernel/config/target
084cc6
084cc6
Signed-off-by: venkata edara <redara@redhat.com>
084cc6
Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
084cc6
---
084cc6
 sos/plugins/targetcli.py | 1 +
084cc6
 1 file changed, 1 insertion(+)
084cc6
084cc6
diff --git a/sos/plugins/targetcli.py b/sos/plugins/targetcli.py
084cc6
index 14be1bf..2a93379 100644
084cc6
--- a/sos/plugins/targetcli.py
084cc6
+++ b/sos/plugins/targetcli.py
084cc6
@@ -31,6 +31,7 @@ class TargetCli(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
084cc6
             "systemctl status target.service"
084cc6
         ])
084cc6
         self.add_journal(units="targetcli")
084cc6
+        self.add_copy_spec("/sys/kernel/config/target")
084cc6
         self.add_copy_spec("/etc/target")
084cc6
 
084cc6
 # vim: set et ts=4 sw=4 :
084cc6
-- 
084cc6
2.7.5
084cc6