aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/juju.py3
-rw-r--r--sos/plugins/openshift.py72
-rw-r--r--sos/plugins/openstack.py145
-rw-r--r--sos/plugins/xfs.py40
4 files changed, 184 insertions, 76 deletions
diff --git a/sos/plugins/juju.py b/sos/plugins/juju.py
index 64b4f1db..c7bbdf17 100644
--- a/sos/plugins/juju.py
+++ b/sos/plugins/juju.py
@@ -25,3 +25,6 @@ class Juju(Plugin, UbuntuPlugin):
def setup(self):
self.add_copy_specs(["/var/log/juju",
"/var/lib/juju"])
+
+ self.add_cmd_output("juju -v status")
+ self.add_cmd_output("juju -v get-constraints")
diff --git a/sos/plugins/openshift.py b/sos/plugins/openshift.py
new file mode 100644
index 00000000..459e75e1
--- /dev/null
+++ b/sos/plugins/openshift.py
@@ -0,0 +1,72 @@
+### This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+from sos.plugins import Plugin, RedHatPlugin
+
+class Openshift(Plugin, RedHatPlugin):
+ '''Openshift related information'''
+
+ plugin_name = "Openshift"
+
+ option_list = [("broker", "Gathers broker specific files", "slow", False),
+ ("node", "Gathers node specific files", "slow", False)]
+
+ def setup(self):
+ self.add_copy_specs(["/etc/openshift-enterprise-version",
+ "/etc/openshift/",
+ "/etc/dhcp/dhclient-*"])
+
+ if self.option_enabled("broker"):
+ self.add_copy_specs(["/var/log/activemq",
+ "/var/log/mongodb",
+ "/var/log/openshift",
+ "/var/www/openshift/broker/log",
+ "/var/www/openshift/broker/httpd/logs/",
+ "/var/www/openshift/console/log",
+ "/var/www/openshift/console/httpd/logs",
+ "/var/log/openshift/user_action.log"])
+
+ self.add_cmd_output("oo-accpet-broker -v")
+ self.add_cmd_output("oo-admin-chk -v")
+ self.add_cmd_output("mco ping")
+ self.add_cmd_output("gem list --local")
+ self.add_cmd_output("cd /var/www/openshift/broker/ && bundle --local")
+
+ if self.option_enabled("node"):
+ self.add_copy_specs(["/var/log/openshift/node",
+ "/cgroup/all/openshift",
+ "/var/log/mcollective.log",
+ "/var/log/openshift-gears-async-start.log",
+ "/var/log/httpd/error_log"])
+
+ self.add_cmd_output("oo-accept-node -v")
+ self.add_cmd_output("oo-admin-ctl-gears list")
+ self.add_cmd_output("ls -l /var/lib/openshift")
+
+ def postproc(self):
+ self.do_file_sub('/etc/openshift/broker.conf',
+ r"(MONGO_PASSWORD=)(.*)",
+ r"\1*******")
+
+ self.do_file_sub('/etc/openshift/broker.conf',
+ r"(SESSION_SECRET=)(.*)",
+ r"\1*******")
+
+ self.do_file_sub('/etc/openshift/console.conf',
+ r"(SESSION_SECRET=)(.*)",
+ r"\1*******")
+
+ self.do_file_sub('/etc/openshift/htpasswd',
+ r"(.*:)(.*)",
+ r"\1********")
diff --git a/sos/plugins/openstack.py b/sos/plugins/openstack.py
index 8c521365..a35a9e85 100644
--- a/sos/plugins/openstack.py
+++ b/sos/plugins/openstack.py
@@ -27,6 +27,68 @@ class OpenStack(Plugin):
option_list = [("log", "gathers all openstack logs", "slow", False)]
+ def setup(self):
+ # Nova
+ if os.path.exists("nova-manage"):
+ self.add_cmd_output(
+ "nova-manage config list 2>/dev/null | sort",
+ suggest_filename="nova_config_list")
+ self.add_cmd_output(
+ "nova-manage service list 2>/dev/null",
+ suggest_filename="nova_service_list")
+ self.add_cmd_output(
+ "nova-manage db version 2>/dev/null",
+ suggest_filename="nova_db_version")
+ self.add_cmd_output(
+ "nova-manage fixed list 2>/dev/null",
+ suggest_filename="nova_fixed_ip_list")
+ self.add_cmd_output(
+ "nova-manage floating list 2>/dev/null",
+ suggest_filename="nova_floating_ip_list")
+ self.add_cmd_output(
+ "nova-manage flavor list 2>/dev/null",
+ suggest_filename="nova_flavor_list")
+ self.add_cmd_output(
+ "nova-manage network list 2>/dev/null",
+ suggest_filename="nova_network_list")
+ self.add_cmd_output(
+ "nova-manage vm list 2>/dev/null",
+ suggest_filename="nova_vm_list")
+ self.add_copy_specs(["/etc/nova/",
+ "/var/log/nova/"])
+
+ # Glance
+ if os.path.exists("glance-manage"):
+ self.add_cmd_output(
+ "glance-manage db_version",
+ suggest_filename="glance_db_version")
+ self.add_copy_specs(["/etc/glance/",
+ "/var/log/glance/"])
+
+ # Cinder
+ if os.path.exists("cinder-manage"):
+ self.addCmdOutput(
+ "cinder-manage db version",
+ suggest_filename="cinder_db_version")
+ self.add_copy_specs(["/etc/cinder/",
+ "/var/log/cinder/"])
+
+ # Keystone
+ self.add_copy_specs(["/etc/keystone/",
+ "/var/log/keystone/"])
+
+ # Quantum
+ self.add_copy_specs(["/etc/quantum/",
+ "/var/log/quantum/"])
+
+ # Swift
+ self.add_copy_specs("/etc/swift/")
+
+ def postproc(self):
+ self.do_file_sub('/etc/keystone/keystone.conf',
+ r"(admin_password\s*=\s*)(.*)",
+ r"\1******")
+
class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
"""OpenStack related information for Debian based distributions
@@ -95,61 +157,13 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
def setup(self):
# Nova
- if os.path.exists("nova-manage"):
- self.add_cmd_output(
- "nova-manage config list 2>/dev/null | sort",
- suggest_filename="nova_config_list")
- self.add_cmd_output(
- "nova-manage service list 2>/dev/null",
- suggest_filename="nova_service_list")
- self.add_cmd_output(
- "nova-manage db version 2>/dev/null",
- suggest_filename="nova_db_version")
- self.add_cmd_output(
- "nova-manage fixed list 2>/dev/null",
- suggest_filename="nova_fixed_ip_list")
- self.add_cmd_output(
- "nova-manage floating list 2>/dev/null",
- suggest_filename="nova_floating_ip_list")
- self.add_cmd_output(
- "nova-manage flavor list 2>/dev/null",
- suggest_filename="nova_flavor_list")
- self.add_cmd_output(
- "nova-manage network list 2>/dev/null",
- suggest_filename="nova_network_list")
- self.add_cmd_output(
- "nova-manage vm list 2>/dev/null",
- suggest_filename="nova_vm_list")
- self.add_copy_specs(["/etc/nova/",
- "/var/log/nova/",
- "/etc/default/nova-volume",
- "/etc/sudoers.d/nova_sudoers",
- "/etc/logrotate.d/nova-*"])
+ self.add_copy_specs("/etc/sudoers.d/nova_sudoers")
+
# Cinder
- if os.path.exists("/usr/bin/cinder-manage"):
- self.addCmdOutput(
- "/usr/bin/cinder-manage db version",
- suggest_filename="cinder_db_version")
- self.addCopySpecs(["/etc/cinder/",
- "/var/log/cinder/",
- "/etc/logrotate.d/cinder-*"])
- # Glance
- if os.path.exists("glance-manage"):
- self.add_cmd_output(
- "glance-manage db_version",
- suggest_filename="glance_db_version")
- self.add_copy_specs(["/etc/glance/",
- "/var/log/glance/",
- "/etc/logrotate.d/glance-*"])
- # Keystone
- self.add_copy_specs(["/etc/keystone/",
- "/var/log/keystone/",
- "/etc/logrotate.d/keystone"])
- # Swift
- self.add_copy_specs(["/etc/swift/"])
+ self.add_copy_specs("/etc/sudoers.d/cinder_sudoers")
+
# Quantum
- self.add_copy_specs(["/etc/quantum/",
- "/var/log/quantum/"])
+ self.add_copy_specs("/etc/sudoers.d/quantum_sudoers")
class RedHatOpenStack(OpenStack, RedHatPlugin):
@@ -181,27 +195,6 @@ class RedHatOpenStack(OpenStack, RedHatPlugin):
self.add_cmd_output("openstack-status")
# Nova
- self.add_copy_specs(["/etc/nova/",
- "/var/log/nova/",
- "/var/lib/nova/",
+ self.add_copy_specs(["/var/lib/nova/",
"/etc/polkit-1/localauthority/50-local.d/50-nova.pkla",
- "/etc/sudoers.d/nova",
- "/etc/logrotate.d/openstack-nova"])
-
- # Glance
- self.add_copy_specs(["/etc/glance/",
- "/var/log/glance/",
- "/etc/logrotate.d/openstack-glance"])
-
- # Keystone
- self.add_copy_specs(["/etc/keystone/",
- "/var/log/keystone/"])
-
- # Quantum
- self.add_copy_specs(["/etc/quantum/",
- "/var/log/quantum/"])
-
- def postproc(self):
- self.do_file_sub('/etc/keystone/keystone.conf',
- r"(admin_password\s*=\s*)(.*)",
- r"\1******")
+ "/etc/sudoers.d/nova"])
diff --git a/sos/plugins/xfs.py b/sos/plugins/xfs.py
new file mode 100644
index 00000000..fe84b033
--- /dev/null
+++ b/sos/plugins/xfs.py
@@ -0,0 +1,40 @@
+### This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+import os
+import re
+from itertools import *
+
+class Xfs(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+ """information on the XFS filesystem
+ """
+
+ plugin_name = 'xfs'
+
+ option_list = [("logprint", 'gathers the log information', 'slow', False)]
+
+ def setup(self):
+ mounts = '/proc/mounts'
+ ext_fs_regex = r"^(/dev/.+).+xfs\s+"
+ for dev in izip(self.do_regex_find_all(ext_fs_regex, mounts)):
+ for e in dev:
+ parts = e.split(' ')
+ self.add_cmd_output("xfs_info %s" % (parts[1]))
+
+ if self.get_option('logprint'):
+ for dev in izip(self.do_regex_find_all(ext_fs_regex, mounts)):
+ for e in dev:
+ parts = e.split(' ')
+ self.add_cmd_output("xfs_logprint -c %s" % (parts[0]))