aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/openstack.py19
-rw-r--r--sos/plugins/openstack_horizon.py74
-rw-r--r--sos/plugins/openstack_keystone.py74
3 files changed, 149 insertions, 18 deletions
diff --git a/sos/plugins/openstack.py b/sos/plugins/openstack.py
index 21155f94..2f696fa9 100644
--- a/sos/plugins/openstack.py
+++ b/sos/plugins/openstack.py
@@ -56,26 +56,16 @@ class OpenStack(Plugin):
self.add_copy_specs(["/etc/nova/",
"/var/log/nova/"])
- # 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******")
-
class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
"""OpenStack related information for Debian based distributions
"""
- packages = ('keystone',
- 'melange',
+ packages = ('melange',
'nova-api-ec2',
'nova-api-metadata',
'nova-api-os-compute',
@@ -94,7 +84,6 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
'nova-scheduler',
'nova-volume',
'novnc',
- 'openstack-dashboard',
'quantum-common',
'quantum-plugin-cisco',
'quantum-plugin-linuxbridge-agent',
@@ -104,9 +93,6 @@ class DebianOpenStack(OpenStack, DebianPlugin, UbuntuPlugin):
'quantum-plugin-ryu',
'quantum-plugin-ryu-agent',
'quantum-server',
- 'python-django-horizon',
- 'python-keystone',
- 'python-keystoneclient',
'python-melange',
'python-nova',
'python-novaclient',
@@ -127,11 +113,8 @@ class RedHatOpenStack(OpenStack, RedHatPlugin):
"""
packages = ('openstack-nova',
- 'openstack-dashboard',
- 'openstack-keystone',
'openstack-quantum',
'python-nova',
- 'python-keystoneclient',
'python-novaclient',
'python-openstackclient',
'python-quantumclient')
diff --git a/sos/plugins/openstack_horizon.py b/sos/plugins/openstack_horizon.py
new file mode 100644
index 00000000..31ee5616
--- /dev/null
+++ b/sos/plugins/openstack_horizon.py
@@ -0,0 +1,74 @@
+## Copyright (C) 2009 Red Hat, Inc., Joey Boggs <jboggs@redhat.com>
+## Copyright (C) 2012 Rackspace US, Inc., Justin Shepherd <jshepher@rackspace.com>
+## Copyright (C) 2013 Red Hat, Inc., Jeremy Agee <jagee@redhat.com>
+
+### 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.
+
+import os
+
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+
+
+class OpenStackHorizon(Plugin):
+ """openstack horizon related information
+ """
+
+ plugin_name = "openstack-horizon"
+ option_list = [("log", "gathers openstack horizon logs", "slow", True)]
+
+ def setup(self):
+ self.add_copy_specs(["/etc/openstack-dashboard/"])
+ if self.option_enabled("log"):
+ self.add_copy_specs(["/var/log/horizon/"])
+
+
+class DebianOpenStackHorizon(OpenStackHorizon, DebianPlugin):
+ """OpenStack Horizon related information for Debian based distributions
+ """
+
+ packages = ('python-django-horizon',
+ 'openstack-dashboard',
+ 'openstack-dashboard-apache')
+
+ def setup(self):
+ super(DebianOpenStackHorizon, self).setup()
+ self.add_copy_specs(["/etc/apache2/sites-available/"])
+
+
+class UbuntuOpenStackHorizon(OpenStackHorizon, UbuntuPlugin):
+ """OpenStack Horizon related information for Ubuntu based distributions
+ """
+
+ packages = ('python-django-horizon',
+ 'openstack-dashboard',
+ 'openstack-dashboard-ubuntu-theme')
+
+ def setup(self):
+ super(UbuntuOpenStackHorizon, self).setup()
+ self.add_copy_specs(["/etc/apache2/conf.d/openstack-dashboard.conf"])
+
+
+class RedHatOpenStackHorizon(OpenStackHorizon, RedHatPlugin):
+ """OpenStack Horizon related information for Red Hat distributions
+ """
+
+ packages = ('python-django-horizon',
+ 'openstack-dashboard')
+
+ def setup(self):
+ super(RedHatOpenStackHorizon, self).setup()
+ self.add_copy_specs(["/etc/httpd/conf.d/openstack-dashboard.conf"])
+ if self.option_enabled("log"):
+ self.add_copy_specs(["/var/log/httpd/"])
diff --git a/sos/plugins/openstack_keystone.py b/sos/plugins/openstack_keystone.py
new file mode 100644
index 00000000..96748d31
--- /dev/null
+++ b/sos/plugins/openstack_keystone.py
@@ -0,0 +1,74 @@
+## Copyright (C) 2013 Red Hat, Inc., Jeremy Agee <jagee@redhat.com>
+
+### 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.
+
+import os
+
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+
+
+class OpenStackKeystone(Plugin):
+ """openstack keystone related information
+ """
+ plugin_name = "openstack-keystone"
+
+ option_list = [("log", "gathers openstack keystone logs", "slow", True),
+ ("nopw", "dont gathers keystone passwords", "slow", True)]
+
+ def setup(self):
+ self.add_copy_specs(["/etc/keystone/default_catalog.templates",
+ "/etc/keystone/keystone.conf",
+ "/etc/keystone/logging.conf",
+ "/etc/keystone/policy.json"])
+
+ if self.option_enabled("log"):
+ self.add_copy_specs(["/var/log/keystone/"])
+
+ def postproc(self):
+ if self.option_enabled("nopw"):
+ self.do_file_sub('/etc/keystone/keystone.conf',
+ r"(?m)^(admin_password.*=)(.*)",
+ r"\1 ******")
+ self.do_file_sub('/etc/keystone/keystone.conf',
+ r"(?m)^(admin_token.*=)(.*)",
+ r"\1 ******")
+ self.do_file_sub('/etc/keystone/keystone.conf',
+ r"(?m)^(connection.*=.*mysql://)(.*)(:)(.*)(@)(.*)",
+ r"\1\2:******@\6")
+ self.do_file_sub('/etc/keystone/keystone.conf',
+ r"(?m)^(password.*=)(.*)",
+ r"\1 ******")
+ self.do_file_sub('/etc/keystone/keystone.conf',
+ r"(?m)^(ca_password.*=)(.*)",
+ r"\1 ******")
+
+
+class DebianOpenStackKeystone(OpenStackKeystone, DebianPlugin, UbuntuPlugin):
+ """OpenStack Keystone related information for Debian based distributions
+ """
+
+ packages = ('keystone',
+ 'python-keystone',
+ 'python-keystoneclient')
+
+
+class RedHatOpenStackKeystone(OpenStackKeystone, RedHatPlugin):
+ """OpenStack Keystone related information for Red Hat distributions
+ """
+
+ packages = ('openstack-keystone',
+ 'python-keystone',
+ 'python-django-openstack-auth',
+ 'python-keystoneclient')