Skip to content

Commit

Permalink
update gluster_block.py
Browse files Browse the repository at this point in the history
[gluster_block] changed plugin behaviour

1.removed targetcli cmd and config as they are taken care by targetcli plugin
2.used tuples instead of lists
  • Loading branch information
vredara committed Jun 19, 2017
1 parent 3ad2d9c commit 1cd8706
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions sos/plugins/gluster_block.py
Expand Up @@ -20,16 +20,13 @@ class GlusterBlock(Plugin, RedHatPlugin):

plugin_name = 'gluster_block'
profiles = ('storage',)
packages = ["gluster-block"]
files = ["/usr/sbin/gluster-block"]
config_to_collect = ["/sys/kernel/config/target", "/etc/target"]
packages = ("gluster-block",)
files = ("/usr/sbin/gluster-block",)

def setup(self):
self.add_cmd_output("targetcli ls")

# collect config files
for config_file in self.config_to_collect:
self.add_copy_spec(config_file)
# collect config
self.add_copy_spec("/sys/kernel/config/target")

# collect logs - apply log_size for any individual file
# all_logs takes precedence over logsize
Expand All @@ -43,3 +40,4 @@ def setup(self):
self.add_copy_spec(f, limit)
else:
self.add_copy_spec("/var/log/gluster-block")

0 comments on commit 1cd8706

Please sign in to comment.