Removing pci-irq-affinity configuration code
This code is being removed as part of an effort to move the pci-irq-affinity-agent into a openstack application container, instead of a platform service. TEST PLAN: PASS: Successfully build a platform ISO PASS: Install the built ISO on an AIO-SX system PASS: Verify that the pci-irq-affinity-agent.service is NOT activated after system startup PASS: Verify that there are no active alarms Story: 2009299 Task: 43653 Depends-On: https://review.opendev.org/c/starlingx/openstack-armada-app/+/830505 Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com> Change-Id: I16206d69b5bb5675f0ea9fa67b32798d53091ac1
This commit is contained in:
parent
a39fe7e435
commit
56e3643572
|
@ -65,7 +65,6 @@ systemconfig.puppet_plugins =
|
|||
032_fm = sysinv.puppet.fm:FmPuppet
|
||||
034_barbican = sysinv.puppet.barbican:BarbicanPuppet
|
||||
035_dockerdistribution = sysinv.puppet.dockerdistribution:DockerDistributionPuppet
|
||||
036_pciirqaffinity = sysinv.puppet.pci_irq_affinity:PciIrqAffinityPuppet
|
||||
038_certmon = sysinv.puppet.certmon:CertMonPuppet
|
||||
039_helm = sysinv.puppet.helm:HelmPuppet
|
||||
040_rook = sysinv.puppet.rook:RookPuppet
|
||||
|
|
|
@ -8494,21 +8494,6 @@ class ConductorManager(service.PeriodicService):
|
|||
config_uuid,
|
||||
config_dict)
|
||||
|
||||
def _update_pciirqaffinity_config(self, context):
|
||||
""" Update the PciIrqAffinity's configuration. """
|
||||
personalities = [constants.WORKER]
|
||||
|
||||
config_uuid = self._config_update_hosts(context, personalities)
|
||||
|
||||
config_dict = {
|
||||
"personalities": personalities,
|
||||
"classes": ['platform::pciirqaffinity::runtime']
|
||||
}
|
||||
|
||||
self._config_apply_runtime_manifest(context,
|
||||
config_uuid,
|
||||
config_dict)
|
||||
|
||||
def _config_sm_stx_openstack(self, context):
|
||||
""" provision dbmon """
|
||||
personalities = [constants.CONTROLLER]
|
||||
|
|
|
@ -1,134 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2017-2021 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
from sysinv.common import exception
|
||||
from sysinv.common import utils
|
||||
from sysinv.helm import common
|
||||
from sysinv.helm import helm
|
||||
from sysinv.puppet import openstack
|
||||
|
||||
|
||||
class PciIrqAffinityPuppet(openstack.OpenstackBasePuppet):
|
||||
"""Class to encapsulate puppet operations for PciIrqAffinity configuration"""
|
||||
PLATFORM_KEYRING_SERVICE = 'CGCS'
|
||||
HELM_CHART_PCI_IRQ_AFFINITY_AGENT = 'pci-irq-affinity-agent'
|
||||
|
||||
# This function will be removed when the service is completely removed from the platform
|
||||
def should_enable_agent_service(self):
|
||||
"""
|
||||
Checks whether the OpenStack application version
|
||||
includes the pci irq affinity agent container
|
||||
"""
|
||||
try:
|
||||
openstack_app = utils.find_openstack_app(self.dbapi)
|
||||
except exception.KubeAppNotFound:
|
||||
return False
|
||||
# Service should only be enabled if the containerized version of the service is not
|
||||
# present
|
||||
return not utils.is_chart_enabled(
|
||||
self.dbapi,
|
||||
openstack_app.name,
|
||||
self.HELM_CHART_PCI_IRQ_AFFINITY_AGENT,
|
||||
common.HELM_NS_OPENSTACK
|
||||
)
|
||||
|
||||
def get_secure_static_config(self):
|
||||
return {}
|
||||
|
||||
def get_system_config(self):
|
||||
config = {}
|
||||
|
||||
if utils.is_openstack_applied(self.dbapi):
|
||||
helm_data = helm.HelmOperatorData(self.dbapi)
|
||||
|
||||
# The openstack services are authenticated with pod based
|
||||
# keystone.
|
||||
keystone_auth_data = helm_data.get_keystone_auth_data()
|
||||
openstack_auth_config = {
|
||||
'platform::pciirqaffinity::params::openstack_enabled':
|
||||
True,
|
||||
'platform::pciirqaffinity::params::openstack_username':
|
||||
keystone_auth_data['admin_user_name'],
|
||||
'platform::pciirqaffinity::params::openstack_tenant':
|
||||
keystone_auth_data['admin_project_name'],
|
||||
'platform::pciirqaffinity::params::openstack_auth_host':
|
||||
keystone_auth_data['auth_host'],
|
||||
'platform::pciirqaffinity::params::openstack_user_domain':
|
||||
keystone_auth_data['admin_user_domain'],
|
||||
'platform::pciirqaffinity::params::openstack_project_domain':
|
||||
keystone_auth_data['admin_project_domain'],
|
||||
'platform::pciirqaffinity::params::openstack_keyring_service':
|
||||
self.PLATFORM_KEYRING_SERVICE,
|
||||
}
|
||||
config.update(openstack_auth_config)
|
||||
|
||||
# The openstack rabbitmq is running in a pod
|
||||
nova_oslo_messaging_data = \
|
||||
helm_data.get_nova_oslo_messaging_data()
|
||||
rabbit_config = {
|
||||
'platform::pciirqaffinity::params::rabbit_host':
|
||||
nova_oslo_messaging_data['host'],
|
||||
'platform::pciirqaffinity::params::rabbit_port':
|
||||
nova_oslo_messaging_data['port'],
|
||||
'platform::pciirqaffinity::params::rabbit_virtual_host':
|
||||
nova_oslo_messaging_data['virt_host'],
|
||||
'platform::pciirqaffinity::params::rabbit_userid':
|
||||
nova_oslo_messaging_data['username'],
|
||||
'platform::pciirqaffinity::params::rabbit_password':
|
||||
nova_oslo_messaging_data['password'],
|
||||
}
|
||||
config.update(rabbit_config)
|
||||
else:
|
||||
configs = {
|
||||
'platform::pciirqaffinity::params::openstack_enabled':
|
||||
False,
|
||||
'platform::pciirqaffinity::params::openstack_username':
|
||||
'undef',
|
||||
'platform::pciirqaffinity::params::openstack_tenant':
|
||||
'undef',
|
||||
'platform::pciirqaffinity::params::openstack_auth_host':
|
||||
'undef',
|
||||
'platform::pciirqaffinity::params::openstack_user_domain':
|
||||
'undef',
|
||||
'platform::pciirqaffinity::params::openstack_project_domain':
|
||||
'undef',
|
||||
'platform::pciirqaffinity::params::openstack_keyring_service':
|
||||
'undef',
|
||||
'platform::pciirqaffinity::params::rabbit_host':
|
||||
'undef',
|
||||
'platform::pciirqaffinity::params::rabbit_port':
|
||||
'undef',
|
||||
'platform::pciirqaffinity::params::rabbit_virtual_host':
|
||||
'undef',
|
||||
'platform::pciirqaffinity::params::rabbit_userid':
|
||||
'undef',
|
||||
'platform::pciirqaffinity::params::rabbit_password':
|
||||
'undef',
|
||||
}
|
||||
config.update(configs)
|
||||
|
||||
return config
|
||||
|
||||
def get_host_config(self, host):
|
||||
host_labels = self.dbapi.label_get_by_host(host.id)
|
||||
return {
|
||||
'platform::pciirqaffinity::params::openstack_enabled':
|
||||
utils.is_openstack_applied(self.dbapi) and
|
||||
utils.has_openstack_compute(host_labels) and
|
||||
self.should_enable_agent_service(),
|
||||
}
|
||||
|
||||
def get_public_url(self):
|
||||
# not an openstack service
|
||||
raise NotImplementedError()
|
||||
|
||||
def get_internal_url(self):
|
||||
# not an openstack service
|
||||
raise NotImplementedError()
|
||||
|
||||
def get_admin_url(self):
|
||||
# not an openstack service
|
||||
raise NotImplementedError()
|
Loading…
Reference in New Issue