aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Jaggars <jhjaggars@gmail.com>2012-08-13 09:05:34 -0700
committerJesse Jaggars <jhjaggars@gmail.com>2012-08-13 09:05:34 -0700
commitaff965fba822617e52e09deed7f80d5a39023b14 (patch)
tree3075f51c73d9bf5bd4c57c5095162a1d6e5e9053
parent007a9467ba08f1d4c2eb860a959e070316509237 (diff)
parentf47c002fee9a57ec3481c5f138abcc49f50d0d9c (diff)
downloadsos-aff965fba822617e52e09deed7f80d5a39023b14.tar.gz
Merge pull request #63 from galstrom21/master
Extending openstack plugin
-rw-r--r--sos/plugins/openstack.py129
1 files changed, 128 insertions, 1 deletions
diff --git a/sos/plugins/openstack.py b/sos/plugins/openstack.py
index ed47f4d3..485187d5 100644
--- a/sos/plugins/openstack.py
+++ b/sos/plugins/openstack.py
@@ -1,3 +1,6 @@
+## Copyright (C) 2009 Red Hat, Inc., Joey Boggs <jboggs@redhat.com>
+## Copyright (C) 2012 Rackspace US, Inc., Justin Shepherd <jshepher@rackspace.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
@@ -16,15 +19,139 @@ import os
from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
-class openstack(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+
+class openstack(Plugin):
"""openstack related information
"""
+ plugin_name = "openstack"
+
+ optionList = [("log", "gathers all openstack logs", "slow", False)]
+
+
+class DebianOpenStack(openstack, DebianPlugin, UbuntuPlugin):
+ """OpenStack related information for Debian based distributions
+ """
+
+ packages = ('glance',
+ 'glance-api',
+ 'glance-client',
+ 'glance-common',
+ 'glance-registry',
+ 'keystone',
+ 'melange',
+ 'nova-api-ec2',
+ 'nova-api-metadata',
+ 'nova-api-os-compute',
+ 'nova-api-os-volume',
+ 'nova-common',
+ 'nova-compute',
+ 'nova-compute-kvm',
+ 'nova-compute-lxc',
+ 'nova-compute-qemu',
+ 'nova-compute-uml',
+ 'nova-compute-xcp',
+ 'nova-compute-xen',
+ 'nova-xcp-plugins',
+ 'nova-consoleauth',
+ 'nova-network',
+ 'nova-scheduler',
+ 'nova-volume',
+ 'novnc',
+ 'openstack-dashboard',
+ 'quantum-common',
+ 'quantum-plugin-cisco',
+ 'quantum-plugin-linuxbridge-agent',
+ 'quantum-plugin-nicira',
+ 'quantum-plugin-openvswitch',
+ 'quantum-plugin-openvswitch-agent',
+ 'quantum-plugin-ryu',
+ 'quantum-plugin-ryu-agent',
+ 'quantum-server',
+ 'swift',
+ 'swift-account',
+ 'swift-container',
+ 'swift-object',
+ 'swift-proxy',
+ 'swauth',
+ 'python-django-horizon',
+ 'python-glance',
+ 'python-keystone',
+ 'python-keystoneclient',
+ 'python-melange',
+ 'python-nova',
+ 'python-novaclient',
+ 'python-novnc',
+ 'python-quantum',
+ 'python-quantumclient',
+ 'python-swift',
+ 'python-swauth')
+
+ def setup(self):
+ # Nova
+ if os.path.exists("/usr/bin/nova-manage"):
+ self.collectExtOutput(
+ "/usr/bin/nova-manage config list 2>/dev/null | sort",
+ suggest_filename="nova_config_list")
+ self.collectExtOutput(
+ "/usr/bin/nova-manage service list 2>/dev/null",
+ suggest_filename="nova_service_list")
+ self.collectExtOutput(
+ "/usr/bin/nova-manage db version 2>/dev/null",
+ suggest_filename="nova_db_version")
+ self.collectExtOutput(
+ "/usr/bin/nova-manage fixed list 2>/dev/null",
+ suggest_filename="nova_fixed_ip_list")
+ self.collectExtOutput(
+ "/usr/bin/nova-manage floating list 2>/dev/null",
+ suggest_filename="nova_floating_ip_list")
+ self.collectExtOutput(
+ "/usr/bin/nova-manage flavor list 2>/dev/null",
+ suggest_filename="nova_flavor_list")
+ self.collectExtOutput(
+ "/usr/bin/nova-manage network list 2>/dev/null",
+ suggest_filename="nova_network_list")
+ self.collectExtOutput(
+ "/usr/bin/nova-manage vm list 2>/dev/null",
+ suggest_filename="nova_vm_list")
+ self.addCopySpecs(["/etc/nova/",
+ "/var/log/nova/",
+ "/etc/default/nova-volume",
+ "/etc/sudoers.d/nova_sudoers",
+ "/etc/logrotate.d/nova-*"])
+ # Glance
+ if os.path.exists("/usr/bin/glance-manage"):
+ self.collectExtOutput(
+ "/usr/bin/glance-manage db_version",
+ suggest_filename="glance_db_version")
+ self.addCopySpecs(["/etc/glance/",
+ "/var/log/glance/",
+ "/etc/logrotate.d/glance-*"])
+ # Keystone
+ self.addCopySpecs(["/etc/keystone/",
+ "/var/log/keystone/",
+ "/etc/logrotate.d/keystone"])
+ # Swift
+ self.addCopySpecs(["/etc/swift/"])
+ # Quantum
+ self.addCopySpecs(["/etc/quantum/",
+ "/var/log/quantum/"])
+
+
+class RedHatOpenStack(openstack, RedHatPlugin):
+ """OpenStack related information for Red Hat distributions
+ """
packages = ('openstack-nova',
'openstack-glance',
'openstack-dashboard',
'openstack-keystone',
'openstack-quantum',
+ 'openstack-swift',
+ 'openstack-swift-account',
+ 'openstack-swift-container',
+ 'openstack-swift-object',
+ 'openstack-swift-proxy',
+ 'swift',
'python-nova',
'python-glanceclient',
'python-keystoneclient',