aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Yarwood <lyarwood@redhat.com>2015-04-07 18:26:42 +0100
committerAdam Stokes <adam.stokes@ubuntu.com>2015-05-10 20:22:00 -0400
commit85d6ea5cdd32cf1b90a10ff0d50a14dcf24902f8 (patch)
tree40f663893623b72d28aabc61089c180841816d50
parent1c6aeb99d86901cb0b6e7e07529282a70028d237 (diff)
downloadsos-85d6ea5cdd32cf1b90a10ff0d50a14dcf24902f8.tar.gz
[openstack] New Openstack Trove (DBaaS) plugin.
https://wiki.openstack.org/wiki/Trove Signed-off-by: Lee Yarwood <lyarwood@redhat.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
-rw-r--r--sos/plugins/openstack_trove.py74
1 files changed, 74 insertions, 0 deletions
diff --git a/sos/plugins/openstack_trove.py b/sos/plugins/openstack_trove.py
new file mode 100644
index 00000000..7c8b6618
--- /dev/null
+++ b/sos/plugins/openstack_trove.py
@@ -0,0 +1,74 @@
+# Copyright (C) 2015 Red Hat, Inc., Lee Yarwood <lyarwood@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.
+
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+
+
+class OpenStackTrove(Plugin):
+ """OpenStack Trove
+ """
+
+ plugin_name = "openstack_trove"
+ profiles = ('openstack',)
+ option_list = [("log", "gathers openstack trove logs", "slow", True)]
+
+ def setup(self):
+ self.add_copy_spec('/etc/trove/')
+
+ if self.get_option('log'):
+ self.add_copy_spec('/var/log/trove')
+
+ def postproc(self):
+
+ protect_keys = [
+ "dns_passkey", "nova_proxy_admin_pass", "rabbit_password",
+ "qpid_password", "connection", "sql_connection", "admin_password"
+ ]
+
+ conf_list = [
+ '/etc/trove/trove.conf',
+ '/etc/trove/trove-conductor.conf',
+ '/etc/trove/trove-guestmanager.conf',
+ '/etc/trove/trove-taskmanager.conf'
+ ]
+
+ regexp = r"((?m)^\s*#*(%s)\s*=\s*)(.*)" % "|".join(protect_keys)
+
+ for conf in conf_list:
+ self.do_file_sub(conf, regexp, r"\1*********")
+
+
+class DebianOpenStackTrove(OpenStackTrove, DebianPlugin, UbuntuPlugin):
+
+ packages = [
+ 'python-trove',
+ 'trove-common',
+ 'trove-api',
+ 'trove-taskmanager'
+ ]
+
+ def setup(self):
+ super(DebianOpenStackTrove, self).setup()
+
+
+class RedHatOpenStackTrove(OpenStackTrove, RedHatPlugin):
+
+ packages = ['openstack-trove']
+
+ def setup(self):
+ super(RedHatOpenStackTrove, self).setup()
+
+# vim: et ts=4 sw=4