Blame SOURCES/sos-bz1036752-gluster-include-geo-replication.patch

629484
From e05bfa7444cacc91972dfbf766f0a9495a7715fb Mon Sep 17 00:00:00 2001
629484
From: "Bryn M. Reeves" <bmr@redhat.com>
629484
Date: Mon, 3 Feb 2014 14:36:46 +0000
629484
Subject: [PATCH 1/2] Make get_cmd_output_now() behaviour match 2.2
629484
629484
The equivalent method in sos-2.2, collectOutputNow() returned an
629484
absolute path to the collected file. Since the archive changes in
629484
3.0 this now returns a path relative to the root of the archive.
629484
629484
This breaks existing users of the interface that try to open and
629484
process the content of the collected file (e.g. gluster).
629484
629484
Return a join of the archive path and file path to the caller.
629484
629484
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
629484
---
629484
 sos/plugins/__init__.py | 2 +-
629484
 1 file changed, 1 insertion(+), 1 deletion(-)
629484
629484
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
629484
index b4768b0..4a72161 100644
629484
--- a/sos/plugins/__init__.py
629484
+++ b/sos/plugins/__init__.py
629484
@@ -572,7 +572,7 @@ class Plugin(object):
629484
             time_passed = time() - start_time
629484
             self.proflog.debug("output: %-75s time: %f" % (exe, time_passed))
629484
 
629484
-        return outfn
629484
+        return os.path.join(self.archive.get_archive_path(), outfn)
629484
 
629484
     # For adding output
629484
     def add_alert(self, alertstring):
629484
-- 
629484
1.7.11.7
629484
629484
629484
From febb52040123293b9de01bc86c4f5c485e3bfc77 Mon Sep 17 00:00:00 2001
629484
From: "Bryn M. Reeves" <bmr@redhat.com>
629484
Date: Mon, 3 Feb 2014 15:17:55 +0000
629484
Subject: [PATCH 2/2] Include geo-replication status in gluster plugin
629484
629484
Add the output of 'gluster volume geo-replication status' for
629484
each discovered gluster volume to the report.
629484
629484
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
629484
---
629484
 sos/plugins/gluster.py | 7 +++++++
629484
 1 file changed, 7 insertions(+)
629484
629484
diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py
629484
index 7c54fa0..02dbac3 100644
629484
--- a/sos/plugins/gluster.py
629484
+++ b/sos/plugins/gluster.py
629484
@@ -102,6 +102,13 @@ class Gluster(Plugin, RedHatPlugin):
629484
         self.add_copy_spec('/tmp/glusterdump.options')
629484
         self.add_copy_spec(self.statedump_dir)
629484
 
629484
+        volume_file = self.get_cmd_output_now("gluster volume info",
629484
+                        "gluster_volume_info")
629484
+        if volume_file:
629484
+            for volname in self.get_volume_names(volume_file):
629484
+                self.add_cmd_output("gluster volume geo-replication %s status"
629484
+                                    % volname)
629484
+
629484
         self.add_cmd_output("gluster volume status")
629484
         # collect this last as some of the other actions create log entries
629484
         self.add_copy_spec("/var/log/glusterfs")
629484
-- 
629484
1.7.11.7
629484