From 9b3d0b7d8732f53dbbd5e02182a9b0a0e1d6d249 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Fri, 31 Aug 2018 17:19:32 +0200 Subject: [PATCH 1/2] [openstack_nova] remove too restrictive check_enabled Enable the plugin just based on package presence. Resolves: #1411 Signed-off-by: Pavel Moravec --- sos/plugins/openstack_nova.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sos/plugins/openstack_nova.py b/sos/plugins/openstack_nova.py index b041a59a..77c3b49a 100644 --- a/sos/plugins/openstack_nova.py +++ b/sos/plugins/openstack_nova.py @@ -200,10 +200,6 @@ class DebianNova(OpenStackNova, DebianPlugin, UbuntuPlugin): 'python-novnc' ) - def check_enabled(self): - self.nova = self.is_installed("nova-common") - return self.nova - def setup(self): super(DebianNova, self).setup() self.add_copy_spec([ @@ -233,10 +229,6 @@ class RedHatNova(OpenStackNova, RedHatPlugin): 'novnc' ) - def check_enabled(self): - self.nova = self.is_installed("openstack-nova-common") - return self.nova - def setup(self): super(RedHatNova, self).setup() self.add_copy_spec([ -- 2.17.1 From f8ee9c4b87c6c3b8aa2bda3425f0e53499515363 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Fri, 31 Aug 2018 20:04:47 +0200 Subject: [PATCH 2/2] [openstack_*] relax enabling of OSP RedHat plugins Allow automatic enabling of OSP packages also on containerized environment. Relevant to: #1411 Signed-off-by: Pavel Moravec Signed-off-by: Bryn M. Reeves --- sos/plugins/openstack_aodh.py | 8 +------- sos/plugins/openstack_ceilometer.py | 10 +--------- sos/plugins/openstack_cinder.py | 12 +----------- sos/plugins/openstack_glance.py | 5 +---- sos/plugins/openstack_heat.py | 10 +--------- sos/plugins/openstack_horizon.py | 5 +---- sos/plugins/openstack_instack.py | 14 +------------- sos/plugins/openstack_ironic.py | 6 +----- sos/plugins/openstack_keystone.py | 7 +------ sos/plugins/openstack_manila.py | 9 +-------- sos/plugins/openstack_neutron.py | 21 +-------------------- sos/plugins/openstack_nova.py | 18 +----------------- sos/plugins/openstack_octavia.py | 13 +++++++++++-- sos/plugins/openstack_sahara.py | 7 +------ sos/plugins/openstack_swift.py | 10 +--------- sos/plugins/openstack_trove.py | 2 +- 16 files changed, 26 insertions(+), 131 deletions(-) diff --git a/sos/plugins/openstack_aodh.py b/sos/plugins/openstack_aodh.py index 9fcdf932..2c9057a6 100644 --- a/sos/plugins/openstack_aodh.py +++ b/sos/plugins/openstack_aodh.py @@ -18,13 +18,7 @@ class OpenStackAodh(Plugin, RedHatPlugin): plugin_name = "openstack_aodh" profiles = ('openstack', 'openstack_controller') - packages = ( - 'openstack-aodh-api', - 'openstack-aodh-listener', - 'openstack-aodh-notifier', - 'openstack-aodh-evaluator,' - 'openstack-aodh-common' - ) + packages = ('openstack-selinux',) requires_root = False diff --git a/sos/plugins/openstack_ceilometer.py b/sos/plugins/openstack_ceilometer.py index 3bdd74c8..bb89fa68 100644 --- a/sos/plugins/openstack_ceilometer.py +++ b/sos/plugins/openstack_ceilometer.py @@ -86,15 +86,7 @@ class DebianCeilometer(OpenStackCeilometer, DebianPlugin, class RedHatCeilometer(OpenStackCeilometer, RedHatPlugin): - packages = ( - 'openstack-ceilometer', - 'openstack-ceilometer-api', - 'openstack-ceilometer-central', - 'openstack-ceilometer-collector', - 'openstack-ceilometer-common', - 'openstack-ceilometer-compute', - 'python-ceilometerclient' - ) + packages = ('openstack-selinux',) def setup(self): super(RedHatCeilometer, self).setup() diff --git a/sos/plugins/openstack_cinder.py b/sos/plugins/openstack_cinder.py index f097fd5b..4fa753c4 100644 --- a/sos/plugins/openstack_cinder.py +++ b/sos/plugins/openstack_cinder.py @@ -130,10 +130,6 @@ class DebianCinder(OpenStackCinder, DebianPlugin, UbuntuPlugin): 'python-cinderclient' ) - def check_enabled(self): - self.cinder = self.is_installed("cinder-common") - return self.cinder - def setup(self): super(DebianCinder, self).setup() @@ -141,13 +137,7 @@ class DebianCinder(OpenStackCinder, DebianPlugin, UbuntuPlugin): class RedHatCinder(OpenStackCinder, RedHatPlugin): cinder = False - packages = ('openstack-cinder', - 'python-cinder', - 'python-cinderclient') - - def check_enabled(self): - self.cinder = self.is_installed("openstack-cinder") - return self.cinder + packages = ('openstack-selinux',) def setup(self): super(RedHatCinder, self).setup() diff --git a/sos/plugins/openstack_glance.py b/sos/plugins/openstack_glance.py index fa68dd8e..bfb5f9fe 100644 --- a/sos/plugins/openstack_glance.py +++ b/sos/plugins/openstack_glance.py @@ -130,9 +130,6 @@ class DebianGlance(OpenStackGlance, DebianPlugin, UbuntuPlugin): class RedHatGlance(OpenStackGlance, RedHatPlugin): - packages = ( - 'openstack-glance', - 'python-glanceclient' - ) + packages = ('openstack-selinux',) # vim: set et ts=4 sw=4 : diff --git a/sos/plugins/openstack_heat.py b/sos/plugins/openstack_heat.py index 26f3f511..1dab72d0 100644 --- a/sos/plugins/openstack_heat.py +++ b/sos/plugins/openstack_heat.py @@ -152,14 +152,6 @@ class DebianHeat(OpenStackHeat, DebianPlugin, UbuntuPlugin): class RedHatHeat(OpenStackHeat, RedHatPlugin): - packages = ( - 'openstack-heat-api', - 'openstack-heat-api-cfn', - 'openstack-heat-api-cloudwatch', - 'openstack-heat-cli', - 'openstack-heat-common', - 'openstack-heat-engine', - 'python-heatclient' - ) + packages = ('openstack-selinux',) # vim: set et ts=4 sw=4 : diff --git a/sos/plugins/openstack_horizon.py b/sos/plugins/openstack_horizon.py index 677a7c28..4299d8db 100644 --- a/sos/plugins/openstack_horizon.py +++ b/sos/plugins/openstack_horizon.py @@ -103,10 +103,7 @@ class UbuntuHorizon(OpenStackHorizon, UbuntuPlugin): class RedHatHorizon(OpenStackHorizon, RedHatPlugin): - packages = ( - 'python-django-horizon', - 'openstack-dashboard' - ) + packages = ('openstack-selinux',) def setup(self): super(RedHatHorizon, self).setup() diff --git a/sos/plugins/openstack_instack.py b/sos/plugins/openstack_instack.py index cf90003e..37a75e02 100644 --- a/sos/plugins/openstack_instack.py +++ b/sos/plugins/openstack_instack.py @@ -125,19 +125,7 @@ class OpenStackInstack(Plugin): class RedHatRDOManager(OpenStackInstack, RedHatPlugin): - packages = [ - 'instack', - 'instack-undercloud', - 'openstack-tripleo', - 'openstack-tripleo-common', - 'openstack-tripleo-heat-templates', - 'openstack-tripleo-image-elements', - 'openstack-tripleo-puppet-elements', - 'openstack-tripleo-ui', - 'openstack-tripleo-validations', - 'puppet-tripleo', - 'python-tripleoclient' - ] + packages = ('openstack-selinux',) def setup(self): super(RedHatRDOManager, self).setup() diff --git a/sos/plugins/openstack_ironic.py b/sos/plugins/openstack_ironic.py index b4cdee6d..84055b67 100644 --- a/sos/plugins/openstack_ironic.py +++ b/sos/plugins/openstack_ironic.py @@ -118,11 +118,7 @@ class DebianIronic(OpenStackIronic, DebianPlugin, UbuntuPlugin): class RedHatIronic(OpenStackIronic, RedHatPlugin): - packages = [ - 'openstack-ironic-api', - 'openstack-ironic-common', - 'openstack-ironic-conductor', - ] + packages = ('openstack-selinux',) discoverd_packages = [ 'openstack-ironic-discoverd', diff --git a/sos/plugins/openstack_keystone.py b/sos/plugins/openstack_keystone.py index a6b1360f..76e4b380 100644 --- a/sos/plugins/openstack_keystone.py +++ b/sos/plugins/openstack_keystone.py @@ -118,12 +118,7 @@ class DebianKeystone(OpenStackKeystone, DebianPlugin, UbuntuPlugin): class RedHatKeystone(OpenStackKeystone, RedHatPlugin): - packages = ( - 'openstack-keystone', - 'python-keystone', - 'python-django-openstack-auth', - 'python-keystoneclient' - ) + packages = ('openstack-selinux',) def setup(self): super(RedHatKeystone, self).setup() diff --git a/sos/plugins/openstack_manila.py b/sos/plugins/openstack_manila.py index ef926cda..e6409d00 100644 --- a/sos/plugins/openstack_manila.py +++ b/sos/plugins/openstack_manila.py @@ -85,14 +85,7 @@ class DebianManila(OpenStackManila, DebianPlugin, UbuntuPlugin): class RedHatManila(OpenStackManila, RedHatPlugin): """OpenStackManila related information for Red Hat distributions.""" - packages = ( - 'puppet-manila', - 'openstack-manila', - 'openstack-manila-share', - 'python-manila', - 'python-manilaclient', - 'python-manila-tests' - ) + packages = ('openstack-selinux',) def setup(self): super(RedHatManila, self).setup() diff --git a/sos/plugins/openstack_neutron.py b/sos/plugins/openstack_neutron.py index a5134c9f..9ae741f3 100644 --- a/sos/plugins/openstack_neutron.py +++ b/sos/plugins/openstack_neutron.py @@ -120,26 +120,7 @@ class DebianNeutron(OpenStackNeutron, DebianPlugin, UbuntuPlugin): class RedHatNeutron(OpenStackNeutron, RedHatPlugin): - packages = [ - 'openstack-neutron', - 'openstack-neutron-linuxbridge' - 'openstack-neutron-metaplugin', - 'openstack-neutron-openvswitch', - 'openstack-neutron-bigswitch', - 'openstack-neutron-brocade', - 'openstack-neutron-cisco', - 'openstack-neutron-hyperv', - 'openstack-neutron-midonet', - 'openstack-neutron-nec' - 'openstack-neutron-nicira', - 'openstack-neutron-plumgrid', - 'openstack-neutron-ryu', - 'python-neutron', - 'python-neutronclient' - ] - - def check_enabled(self): - return self.is_installed("openstack-neutron") + packages = ('openstack-selinux',) def setup(self): super(RedHatNeutron, self).setup() diff --git a/sos/plugins/openstack_nova.py b/sos/plugins/openstack_nova.py index 77c3b49a..4fde7565 100644 --- a/sos/plugins/openstack_nova.py +++ b/sos/plugins/openstack_nova.py @@ -211,23 +211,7 @@ class DebianNova(OpenStackNova, DebianPlugin, UbuntuPlugin): class RedHatNova(OpenStackNova, RedHatPlugin): nova = False - packages = ( - 'openstack-nova-common', - 'openstack-nova-network', - 'openstack-nova-conductor', - 'openstack-nova-conductor', - 'openstack-nova-scheduler', - 'openstack-nova-console', - 'openstack-nova-novncproxy', - 'openstack-nova-compute', - 'openstack-nova-api', - 'openstack-nova-cert', - 'openstack-nova-cells', - 'openstack-nova-objectstore', - 'python-nova', - 'python-novaclient', - 'novnc' - ) + packages = ('openstack-selinux',) def setup(self): super(RedHatNova, self).setup() diff --git a/sos/plugins/openstack_octavia.py b/sos/plugins/openstack_octavia.py index 46a943a5..86a91dc1 100644 --- a/sos/plugins/openstack_octavia.py +++ b/sos/plugins/openstack_octavia.py @@ -9,12 +9,11 @@ from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin -class OpenStackOctavia(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): +class OpenStackOctavia(Plugin): """Openstack Octavia""" plugin_name = "openstack_octavia" profiles = ('openstack', 'openstack_controller') - packages = ('openstack-octavia-common',) var_puppet_gen = "/var/lib/config-data/puppet-generated/octavia" @@ -101,4 +100,14 @@ class OpenStackOctavia(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): regexp, r"\1*********" ) + +class DebianOctavia(OpenStackOctavia, DebianPlugin, UbuntuPlugin): + + packages = ('openstack-octavia-common',) + + +class RedHatOctavia(OpenStackOctavia, RedHatPlugin): + + packages = ('openstack-selinux',) + # vim: set et ts=4 sw=4 : diff --git a/sos/plugins/openstack_sahara.py b/sos/plugins/openstack_sahara.py index cdb4b02d..83661b0f 100644 --- a/sos/plugins/openstack_sahara.py +++ b/sos/plugins/openstack_sahara.py @@ -86,12 +86,7 @@ class DebianSahara(OpenStackSahara, DebianPlugin, UbuntuPlugin): class RedHatSahara(OpenStackSahara, RedHatPlugin): """OpenStack sahara related information for Red Hat distributions.""" - packages = ( - 'openstack-sahara', - 'openstack-sahara-api', - 'openstack-sahara-engine', - 'python-saharaclient' - ) + packages = ('openstack-selinux',) def setup(self): super(RedHatSahara, self).setup() diff --git a/sos/plugins/openstack_swift.py b/sos/plugins/openstack_swift.py index fdf101a9..6637bfa5 100644 --- a/sos/plugins/openstack_swift.py +++ b/sos/plugins/openstack_swift.py @@ -91,14 +91,6 @@ class DebianSwift(OpenStackSwift, DebianPlugin, UbuntuPlugin): class RedHatSwift(OpenStackSwift, RedHatPlugin): - packages = ( - 'openstack-swift', - 'openstack-swift-account', - 'openstack-swift-container', - 'openstack-swift-object', - 'openstack-swift-proxy', - 'swift', - 'python-swiftclient' - ) + packages = ('openstack-selinux',) # vim: set et ts=4 sw=4 : diff --git a/sos/plugins/openstack_trove.py b/sos/plugins/openstack_trove.py index 6ec8aff8..699ae43d 100644 --- a/sos/plugins/openstack_trove.py +++ b/sos/plugins/openstack_trove.py @@ -83,7 +83,7 @@ class DebianTrove(OpenStackTrove, DebianPlugin, UbuntuPlugin): class RedHatTrove(OpenStackTrove, RedHatPlugin): - packages = ['openstack-trove'] + packages = ('openstack-selinux',) def setup(self): super(RedHatTrove, self).setup() -- 2.17.1