Blob Blame History Raw
commit 8447dec1831feb4d93bf8d300880f87765efb1c8
Author: Bryn M. Reeves <bmr@redhat.com>
Date:   Mon Feb 10 15:07:36 2014 +0000

    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>

diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py
index 02dbac3..4286b59 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