From 970230f369f91ea0fc49cde1130a232ea91cd75a Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Thu, 10 Jul 2014 15:16:46 +0100 Subject: [PATCH] [openshift] backport upstream changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 3d3784c9c2e01e18fcc0a2f83dc7b55d1607235b Author: Pep Turro Mauri Date: Tue Jul 8 14:05:12 2014 +0200 [openshift] Improve password obfuscation Rewrite MCollective passwords and be a bit more flexible with white space around =. Also provide examples of strings for the string substitutions. Related: #323. Signed-off-by: Pep TurrĂ³ Mauri commit 2e1f199421e00cc30963f3fb022c5c173b18d509 Author: Pep Turro Mauri Date: Tue Jul 8 13:37:48 2014 +0200 [openshift] Don't collect all of /etc/openshift Reduce glob based collection and aim at more specific paths. Signed-off-by: Pep TurrĂ³ Mauri --- sos/plugins/openshift.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sos/plugins/openshift.py b/sos/plugins/openshift.py index aeff320..17320b1 100755 --- a/sos/plugins/openshift.py +++ b/sos/plugins/openshift.py @@ -39,15 +39,18 @@ class openshift(sos.plugintools.PluginBase): def setup(self): self.gear = self.getOption('gear') self.addCopySpecs([ - "/etc/openshift-enterprise-*", + "/etc/openshift-enterprise-release", "/var/log/openshift/", - "/etc/openshift/" + "/etc/openshift/*.conf", + "/etc/openshift/upgrade/", ]) self.collectExtOutput("oo-diagnostics -v") if self.is_broker(): self.addCopySpecs([ + "/etc/openshift/quickstarts.json", + "/etc/openshift/plugins.d/*.conf", "/var/www/openshift/broker/httpd/conf.d/*.conf", "/var/www/openshift/console/httpd/conf.d/*.conf", ]) @@ -60,6 +63,9 @@ class openshift(sos.plugintools.PluginBase): if self.is_node(): self.addCopySpecs([ + "/etc/openshift/node-plugins.d/*.conf", + "/etc/openshift/cart.conf.d/", + "/etc/openshift/env/", "/cgroup/*/openshift", "/opt/%s/%s/root/etc/mcollective/" % (self.vendor, self.ruby), "/var/log/httpd/openshift_log", @@ -95,8 +101,8 @@ class openshift(sos.plugintools.PluginBase): r"(SESSION_SECRET=)(.*)", r"\1*******") - self.doRegexSub('/etc/openshift/htpasswd', - r"(.*:)(.*)", + self.doRegexSub("/opt/%s/%s/root/etc/mcollective/server.cfg" % (self.vendor, self.ruby), + r"(.*\.password.?=)(.*)", r"\1********") # vim: et ts=4 sw=4 -- 1.9.3