aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-05-26 11:25:42 -0400
committerBryanQuigley <code@bryanquigley.com>2021-06-16 00:22:11 -0700
commitea3d6ba1ee9d2d8b352f1d8d0964f52c1589c823 (patch)
tree37d96a6a9294f6f821a6167d18e59ada148a809d
parentc10c1a39a338cb52ca398a5568b1dc31001612fa (diff)
downloadsos-ea3d6ba1ee9d2d8b352f1d8d0964f52c1589c823.tar.gz
[plugins] Add containers enablement trigger
Adds a `containers` enablement trigger for plugins that currently check for specifically named containers as part of their `setup()` collections. This is primarily the openstack plugins checking for their respective component api's to be running in a container. In these cases the name pattern used in the `container_exists()` checks are used for the enablement trigger as well. Resolves: #2561 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/openstack_cinder.py1
-rw-r--r--sos/report/plugins/openstack_glance.py1
-rw-r--r--sos/report/plugins/openstack_heat.py1
-rw-r--r--sos/report/plugins/openstack_ironic.py1
-rw-r--r--sos/report/plugins/openstack_manila.py1
-rw-r--r--sos/report/plugins/openstack_nova.py1
-rw-r--r--sos/report/plugins/openstack_placement.py1
-rw-r--r--sos/report/plugins/ovn_central.py5
8 files changed, 8 insertions, 4 deletions
diff --git a/sos/report/plugins/openstack_cinder.py b/sos/report/plugins/openstack_cinder.py
index 4eb58a2e..bc58a2a9 100644
--- a/sos/report/plugins/openstack_cinder.py
+++ b/sos/report/plugins/openstack_cinder.py
@@ -20,6 +20,7 @@ class OpenStackCinder(Plugin):
short_desc = 'OpenStack cinder'
plugin_name = "openstack_cinder"
profiles = ('openstack', 'openstack_controller')
+ containers = ('.*cinder_api',)
var_puppet_gen = "/var/lib/config-data/puppet-generated/cinder"
diff --git a/sos/report/plugins/openstack_glance.py b/sos/report/plugins/openstack_glance.py
index e590e783..eb0f88e9 100644
--- a/sos/report/plugins/openstack_glance.py
+++ b/sos/report/plugins/openstack_glance.py
@@ -21,6 +21,7 @@ class OpenStackGlance(Plugin):
short_desc = 'OpenStack Glance'
plugin_name = "openstack_glance"
profiles = ('openstack', 'openstack_controller')
+ containers = ('glance_api',)
option_list = []
var_puppet_gen = "/var/lib/config-data/puppet-generated/glance_api"
diff --git a/sos/report/plugins/openstack_heat.py b/sos/report/plugins/openstack_heat.py
index 17b24b71..3441f91d 100644
--- a/sos/report/plugins/openstack_heat.py
+++ b/sos/report/plugins/openstack_heat.py
@@ -18,6 +18,7 @@ class OpenStackHeat(Plugin):
short_desc = 'OpenStack Heat'
plugin_name = "openstack_heat"
profiles = ('openstack', 'openstack_controller')
+ containers = ('.*heat_api',)
option_list = []
var_puppet_gen = "/var/lib/config-data/puppet-generated/heat"
diff --git a/sos/report/plugins/openstack_ironic.py b/sos/report/plugins/openstack_ironic.py
index 88f00643..c36fb6b6 100644
--- a/sos/report/plugins/openstack_ironic.py
+++ b/sos/report/plugins/openstack_ironic.py
@@ -18,6 +18,7 @@ class OpenStackIronic(Plugin):
short_desc = 'OpenStack Ironic'
plugin_name = "openstack_ironic"
profiles = ('openstack', 'openstack_undercloud')
+ containers = ('.*ironic_api',)
var_puppet_gen = "/var/lib/config-data/puppet-generated/ironic"
ins_puppet_gen = var_puppet_gen + "_inspector"
diff --git a/sos/report/plugins/openstack_manila.py b/sos/report/plugins/openstack_manila.py
index b4e2523d..bf84e0ab 100644
--- a/sos/report/plugins/openstack_manila.py
+++ b/sos/report/plugins/openstack_manila.py
@@ -16,6 +16,7 @@ class OpenStackManila(Plugin):
short_desc = 'OpenStack Manila'
plugin_name = "openstack_manila"
profiles = ('openstack', 'openstack_controller')
+ containers = ('.*manila_api',)
option_list = []
var_puppet_gen = "/var/lib/config-data/puppet-generated/manila"
diff --git a/sos/report/plugins/openstack_nova.py b/sos/report/plugins/openstack_nova.py
index a1177c70..53210c48 100644
--- a/sos/report/plugins/openstack_nova.py
+++ b/sos/report/plugins/openstack_nova.py
@@ -22,6 +22,7 @@ class OpenStackNova(Plugin):
short_desc = 'OpenStack Nova'
plugin_name = "openstack_nova"
profiles = ('openstack', 'openstack_controller', 'openstack_compute')
+ containers = ('.*nova_api',)
var_puppet_gen = "/var/lib/config-data/puppet-generated/nova"
service_name = "openstack-nova-api.service"
diff --git a/sos/report/plugins/openstack_placement.py b/sos/report/plugins/openstack_placement.py
index 031825cf..1c7b808d 100644
--- a/sos/report/plugins/openstack_placement.py
+++ b/sos/report/plugins/openstack_placement.py
@@ -16,6 +16,7 @@ class OpenStackPlacement(Plugin):
short_desc = 'OpenStack Placement'
plugin_name = "openstack_placement"
profiles = ('openstack', 'openstack_controller')
+ containers = ('.*placement_api',)
var_puppet_gen = "/var/lib/config-data/puppet-generated/placement"
service_name = 'openstack-placement-api'
diff --git a/sos/report/plugins/ovn_central.py b/sos/report/plugins/ovn_central.py
index 66424d16..a4c483a9 100644
--- a/sos/report/plugins/ovn_central.py
+++ b/sos/report/plugins/ovn_central.py
@@ -24,6 +24,7 @@ class OVNCentral(Plugin):
short_desc = 'OVN Northd'
plugin_name = "ovn_central"
profiles = ('network', 'virt')
+ containers = ('ovs-db-bundle.*',)
def get_tables_from_schema(self, filename, skip=[]):
if self._container_name:
@@ -64,10 +65,6 @@ class OVNCentral(Plugin):
for table in tables:
cmds.append('%s list %s' % (ovn_cmd, table))
- def check_enabled(self):
- return (self.container_exists('ovs-dbs-bundle.*') or
- super(OVNCentral, self).check_enabled())
-
def setup(self):
self._container_name = self.get_container_by_name('ovs-dbs-bundle.*')