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