Cleaning up panko from bare metal
All of the service parameters are removed from sysinv since they are now driven through helm charts. There is no panko DB or config on bare metal, so there is no need for upgrade, backup and restore or region config to have panko related code. Verified that the panko service parameters are not present. The sysinv DB schema will be cleaned up in a later commit. Story: 2004764 Task: 30519 Change-Id: I6e6e0ab41083c6825f73bd287d3babd678e2ef64 Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
parent
7bbe7f1bcd
commit
76cbb65df6
@ -72,7 +72,7 @@ def get_backup_databases(cinder_config=False):
|
||||
# Databases common to all configurations
|
||||
REGION_LOCAL_DATABASES = ('postgres', 'template1', 'nova', 'sysinv',
|
||||
'neutron', 'heat', 'nova_api',
|
||||
'aodh', 'murano', 'magnum', 'panko', 'ironic',
|
||||
'aodh', 'murano', 'magnum', 'ironic',
|
||||
'nova_cell0', 'gnocchi', 'fm', 'barbican')
|
||||
REGION_SHARED_DATABASES = ('glance', 'keystone')
|
||||
|
||||
|
@ -76,7 +76,6 @@ NFV_USER_NAME=vim
|
||||
NFV_PASSWORD=password2WO*
|
||||
MTCE_USER_NAME=mtce
|
||||
MTCE_PASSWORD=password2WO*
|
||||
PANKO_USER_NAME=panko
|
||||
FM_USER_NAME=fm
|
||||
FM_PASSWORD=password2WO*
|
||||
BARBICAN_USER_NAME=barbican
|
||||
|
@ -103,9 +103,6 @@ def get_db_credentials(shared_services, from_release):
|
||||
'magnum': {'hiera_user_key': 'magnum::db::postgresql::user',
|
||||
'keyring_password_key': 'magnum',
|
||||
},
|
||||
'panko': {'hiera_user_key': 'panko::db::postgresql::user',
|
||||
'keyring_password_key': 'panko',
|
||||
},
|
||||
'ironic': {'hiera_user_key': 'ironic::db::postgresql::user',
|
||||
'keyring_password_key': 'ironic',
|
||||
},
|
||||
@ -567,10 +564,6 @@ def migrate_databases(from_release, shared_services, db_credentials,
|
||||
f.write("[database]\n")
|
||||
f.write(get_connection_string(db_credentials, 'magnum'))
|
||||
|
||||
with open("/etc/panko/panko-dbsync.conf", "w") as f:
|
||||
f.write("[database]\n")
|
||||
f.write(get_connection_string(db_credentials, 'panko'))
|
||||
|
||||
with open("/etc/ironic/ironic-dbsync.conf", "w") as f:
|
||||
f.write("[database]\n")
|
||||
f.write(get_connection_string(db_credentials, 'ironic'))
|
||||
@ -627,9 +620,6 @@ def migrate_databases(from_release, shared_services, db_credentials,
|
||||
('magnum',
|
||||
'magnum-db-manage --config-file /etc/magnum/magnum-dbsync.conf ' +
|
||||
'upgrade'),
|
||||
# Migrate panko (new in R5)
|
||||
('panko',
|
||||
'panko-dbsync --config-file /etc/panko/panko-dbsync.conf'),
|
||||
# Migrate ironic (new in R5)
|
||||
('ironic',
|
||||
'ironic-dbsync --config-file /etc/ironic/ironic-dbsync.conf ' +
|
||||
|
@ -28,7 +28,7 @@ def get_upgrade_databases(shared_services):
|
||||
|
||||
UPGRADE_DATABASES = ('postgres', 'template1', 'nova', 'sysinv', 'murano',
|
||||
'ceilometer', 'neutron', 'heat', 'nova_api', 'aodh',
|
||||
'magnum', 'panko', 'ironic', 'barbican')
|
||||
'magnum', 'ironic', 'barbican')
|
||||
|
||||
UPGRADE_DATABASE_SKIP_TABLES = {'postgres': (), 'template1': (),
|
||||
'heat': (), 'nova': (), 'nova_api': (),
|
||||
@ -37,7 +37,6 @@ def get_upgrade_databases(shared_services):
|
||||
'aodh': (),
|
||||
'murano': (),
|
||||
'magnum': (),
|
||||
'panko': (),
|
||||
'ironic': (),
|
||||
'barbican': (),
|
||||
'ceilometer': ('metadata_bool',
|
||||
|
@ -63,7 +63,6 @@ systemconfig.puppet_plugins =
|
||||
023_magnum = sysinv.puppet.magnum:MagnumPuppet
|
||||
024_murano = sysinv.puppet.murano:MuranoPuppet
|
||||
025_ironic = sysinv.puppet.ironic:IronicPuppet
|
||||
026_panko = sysinv.puppet.panko:PankoPuppet
|
||||
027_dcmanager = sysinv.puppet.dcmanager:DCManagerPuppet
|
||||
028_dcorch = sysinv.puppet.dcorch:DCOrchPuppet
|
||||
029_kubernetes = sysinv.puppet.kubernetes:KubernetesPuppet
|
||||
|
@ -890,7 +890,6 @@ SERVICE_TYPE_PLATFORM = 'platform'
|
||||
SERVICE_TYPE_NOVA = 'nova'
|
||||
SERVICE_TYPE_SWIFT = 'swift'
|
||||
SERVICE_TYPE_IRONIC = 'ironic'
|
||||
SERVICE_TYPE_PANKO = 'panko'
|
||||
SERVICE_TYPE_AODH = 'aodh'
|
||||
SERVICE_TYPE_GLANCE = 'glance'
|
||||
SERVICE_TYPE_BARBICAN = 'barbican'
|
||||
@ -1078,11 +1077,6 @@ SERVICE_PARAM_NAME_NOVA_PCI_ALIAS_USER = NOVA_PCI_ALIAS_USER_NAME
|
||||
# default time to live seconds
|
||||
PM_TTL_DEFAULT = 86400
|
||||
|
||||
# Panko Service Parameters
|
||||
SERVICE_PARAM_SECTION_PANKO_DATABASE = "database"
|
||||
SERVICE_PARAM_NAME_PANKO_DATABASE_EVENT_TIME_TO_LIVE = "event_time_to_live"
|
||||
SERVICE_PARAM_PANKO_DATABASE_EVENT_TIME_TO_LIVE_DEFAULT = PM_TTL_DEFAULT
|
||||
|
||||
# AODH Service Parameters
|
||||
SERVICE_PARAM_SECTION_AODH_DATABASE = "database"
|
||||
SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE = "alarm_history_time_to_live"
|
||||
|
@ -598,13 +598,6 @@ def _validate_mnfa_timeout(name, value):
|
||||
SERVICE_PARAM_PLAT_MTCE_MNFA_TIMEOUT_MAX)
|
||||
|
||||
|
||||
# Validate range of Performance Monitoring Event 'time to live" value
|
||||
def _validate_event_time_to_live_range(name, value):
|
||||
_validate_range(name, value,
|
||||
SERVICE_PARAM_NAME_PANKO_DATABASE_EVENT_TIME_TO_LIVE_MIN,
|
||||
SERVICE_PARAM_NAME_PANKO_DATABASE_EVENT_TIME_TO_LIVE_MAX)
|
||||
|
||||
|
||||
# Validate range of Alarm History 'time to live' value
|
||||
def _validate_alarm_history_time_to_live_range(name, value):
|
||||
_validate_range(name, value,
|
||||
@ -1461,25 +1454,6 @@ PLATFORM_MTCE_PARAMETER_RESOURCE = {
|
||||
constants.SERVICE_PARAM_PLAT_MTCE_MNFA_TIMEOUT: 'platform::mtce::params::mnfa_timeout',
|
||||
}
|
||||
|
||||
# Panko Event TTL range from 1 hour to 1 year
|
||||
SERVICE_PARAM_NAME_PANKO_DATABASE_EVENT_TIME_TO_LIVE_MIN = 3600
|
||||
SERVICE_PARAM_NAME_PANKO_DATABASE_EVENT_TIME_TO_LIVE_MAX = 31536000
|
||||
|
||||
# Panko Service Parameters
|
||||
PANKO_PARAMETER_MANDATORY = [
|
||||
constants.SERVICE_PARAM_NAME_PANKO_DATABASE_EVENT_TIME_TO_LIVE,
|
||||
]
|
||||
|
||||
PANKO_PARAMETER_VALIDATOR = {
|
||||
constants.SERVICE_PARAM_NAME_PANKO_DATABASE_EVENT_TIME_TO_LIVE:
|
||||
_validate_event_time_to_live_range,
|
||||
}
|
||||
|
||||
PANKO_PARAMETER_RESOURCE = {
|
||||
constants.SERVICE_PARAM_NAME_PANKO_DATABASE_EVENT_TIME_TO_LIVE:
|
||||
'openstack::panko::params::event_time_to_live',
|
||||
}
|
||||
|
||||
# AODH Alarm History TTL range from 1 hour to 1 year
|
||||
SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE_MIN = 3600
|
||||
SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE_MAX = 31536000
|
||||
@ -1758,13 +1732,6 @@ SERVICE_PARAMETER_SCHEMA = {
|
||||
SERVICE_PARAM_DATA_FORMAT: NOVA_PCI_ALIAS_PARAMETER_DATA_FORMAT,
|
||||
},
|
||||
},
|
||||
constants.SERVICE_TYPE_PANKO: {
|
||||
constants.SERVICE_PARAM_SECTION_PANKO_DATABASE: {
|
||||
SERVICE_PARAM_MANDATORY: PANKO_PARAMETER_MANDATORY,
|
||||
SERVICE_PARAM_VALIDATOR: PANKO_PARAMETER_VALIDATOR,
|
||||
SERVICE_PARAM_RESOURCE: PANKO_PARAMETER_RESOURCE,
|
||||
},
|
||||
},
|
||||
constants.SERVICE_TYPE_AODH: {
|
||||
constants.SERVICE_PARAM_SECTION_AODH_DATABASE: {
|
||||
SERVICE_PARAM_MANDATORY: AODH_PARAMETER_MANDATORY,
|
||||
|
@ -503,11 +503,6 @@ class ConductorManager(service.PeriodicService):
|
||||
'name': constants.SERVICE_PARAM_PLAT_MTCE_MNFA_TIMEOUT,
|
||||
'value': constants.SERVICE_PARAM_PLAT_MTCE_MNFA_TIMEOUT_DEFAULT,
|
||||
},
|
||||
{'service': constants.SERVICE_TYPE_PANKO,
|
||||
'section': constants.SERVICE_PARAM_SECTION_PANKO_DATABASE,
|
||||
'name': constants.SERVICE_PARAM_NAME_PANKO_DATABASE_EVENT_TIME_TO_LIVE,
|
||||
'value': constants.SERVICE_PARAM_PANKO_DATABASE_EVENT_TIME_TO_LIVE_DEFAULT,
|
||||
},
|
||||
{'service': constants.SERVICE_TYPE_AODH,
|
||||
'section': constants.SERVICE_PARAM_SECTION_AODH_DATABASE,
|
||||
'name': constants.SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE,
|
||||
@ -7256,13 +7251,6 @@ class ConductorManager(service.PeriodicService):
|
||||
}
|
||||
self._config_apply_runtime_manifest(context, config_uuid, config_dict)
|
||||
|
||||
elif service == constants.SERVICE_TYPE_PANKO:
|
||||
config_dict = {
|
||||
"personalities": personalities,
|
||||
"classes": ['openstack::panko::runtime']
|
||||
}
|
||||
self._config_apply_runtime_manifest(context, config_uuid, config_dict)
|
||||
|
||||
elif service == constants.SERVICE_TYPE_AODH:
|
||||
config_dict = {
|
||||
"personalities": personalities,
|
||||
|
@ -1,89 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2017 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
from sysinv.common import constants
|
||||
|
||||
from sysinv.puppet import openstack
|
||||
|
||||
|
||||
class PankoPuppet(openstack.OpenstackBasePuppet):
|
||||
"""Class to encapsulate puppet operations for panko configuration"""
|
||||
|
||||
SERVICE_NAME = 'panko'
|
||||
SERVICE_PORT = 8977
|
||||
|
||||
def get_static_config(self):
|
||||
dbuser = self._get_database_username(self.SERVICE_NAME)
|
||||
|
||||
return {
|
||||
'panko::db::postgresql::user': dbuser,
|
||||
}
|
||||
|
||||
def get_secure_static_config(self):
|
||||
dbpass = self._get_database_password(self.SERVICE_NAME)
|
||||
kspass = self._get_service_password(self.SERVICE_NAME)
|
||||
|
||||
return {
|
||||
'panko::db::postgresql::password': dbpass,
|
||||
|
||||
'panko::keystone::auth::password': kspass,
|
||||
'panko::keystone::authtoken::password': kspass,
|
||||
}
|
||||
|
||||
def get_system_config(self):
|
||||
ksuser = self._get_service_user_name(self.SERVICE_NAME)
|
||||
|
||||
config = {
|
||||
'panko::keystone::auth::region':
|
||||
self._get_service_region_name(self.SERVICE_NAME),
|
||||
'panko::keystone::auth::public_url': self.get_public_url(),
|
||||
'panko::keystone::auth::internal_url': self.get_internal_url(),
|
||||
'panko::keystone::auth::admin_url': self.get_admin_url(),
|
||||
'panko::keystone::auth::auth_name': ksuser,
|
||||
'panko::keystone::auth::tenant': self._get_service_tenant_name(),
|
||||
|
||||
'panko::keystone::authtoken::auth_url':
|
||||
self._keystone_identity_uri(),
|
||||
'panko::keystone::authtoken::auth_uri':
|
||||
self._keystone_auth_uri(),
|
||||
'panko::keystone::authtoken::user_domain_name':
|
||||
self._get_service_user_domain_name(),
|
||||
'panko::keystone::authtoken::project_domain_name':
|
||||
self._get_service_project_domain_name(),
|
||||
'panko::keystone::authtoken::project_name':
|
||||
self._get_service_tenant_name(),
|
||||
'panko::keystone::authtoken::region_name':
|
||||
self._keystone_region_name(),
|
||||
'panko::keystone::authtoken::username': ksuser,
|
||||
|
||||
'openstack::panko::params::region_name':
|
||||
self._get_service_region_name(self.SERVICE_NAME),
|
||||
'openstack::panko::params::service_create':
|
||||
self._to_create_services(),
|
||||
}
|
||||
if (self._distributed_cloud_role() ==
|
||||
constants.DISTRIBUTED_CLOUD_ROLE_SYSTEMCONTROLLER):
|
||||
config.update({'openstack::panko::params::service_enabled': False,
|
||||
'panko::keystone::auth::configure_endpoint': False})
|
||||
|
||||
return config
|
||||
|
||||
def get_secure_system_config(self):
|
||||
config = {
|
||||
'panko::db::database_connection':
|
||||
self._format_database_connection(self.SERVICE_NAME),
|
||||
}
|
||||
|
||||
return config
|
||||
|
||||
def get_public_url(self):
|
||||
return self._format_public_endpoint(self.SERVICE_PORT)
|
||||
|
||||
def get_internal_url(self):
|
||||
return self._format_private_endpoint(self.SERVICE_PORT)
|
||||
|
||||
def get_admin_url(self):
|
||||
return self._format_private_endpoint(self.SERVICE_PORT)
|
Loading…
x
Reference in New Issue
Block a user