diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-02-10 15:07:36 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-02-10 15:07:36 +0000 |
commit | aa0a14db011c59116beb51413ee9a0b253e04f1a (patch) | |
tree | 1881e1e971ce68684853af8200a83f5afca7f639 | |
parent | a96a5e8397b465f556c5a10274a4c7248e737fbf (diff) | |
download | sos-aa0a14db011c59116beb51413ee9a0b253e04f1a.tar.gz |
Fix gluster volume name extraction
The get_volume_names() function in the gluster plugin tries to
extract volume names from the output of the "gluster volume info"
command using a slice range. The range start should be 12 to
account for the "Volume Name:" label at the start of the line.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/gluster.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py index 02dbac34..4286b594 100644 --- a/sos/plugins/gluster.py +++ b/sos/plugins/gluster.py @@ -39,7 +39,7 @@ class Gluster(Plugin, RedHatPlugin): for line in fp.readlines(): if not line.startswith("Volume Name:"): continue - volname = line[14:-1] + volname = line[12:-1] out.append(volname) fp.close() return out |