Remove AODH and Gnocchi service parameters

Removes the aodh service parameter alarm_history_time_to_live
Removes references to aodh and gnocchi from puppet and upgrade code.
Removes old gnocchi references from remote logging.

Story: 2004764
Task: 30537
Change-Id: I3a03dd4a2afd47f1cc3f677f02d348eabf11a653
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
Al Bailey 2019-04-23 14:01:27 -05:00
parent f61784180d
commit 0704edb6cc
10 changed files with 2 additions and 267 deletions

View File

@ -73,8 +73,6 @@ PATCHING_SERVICE_NAME=patching
PATCHING_SERVICE_TYPE=patching
NFV_USER_NAME=vim
NFV_PASSWORD=password2WO*
AODH_USER_NAME=aodh
AODH_PASSWORD=password2WO*
MTCE_USER_NAME=mtce
MTCE_PASSWORD=password2WO*
FM_USER_NAME=fm

View File

@ -72,10 +72,7 @@ def get_db_credentials(shared_services, from_release):
Returns the database credentials using the provided shared services.
"""
db_credential_keys = \
{'aodh': {'hiera_user_key': 'aodh::db::postgresql::user',
'keyring_password_key': 'aodh',
},
'barbican': {'hiera_user_key': 'barbican::db::postgresql::user',
{'barbican': {'hiera_user_key': 'barbican::db::postgresql::user',
'keyring_password_key': 'barbican',
},
'ceilometer': {'hiera_user_key': 'ceilometer::db::postgresql::user',
@ -551,10 +548,6 @@ def migrate_databases(from_release, shared_services, db_credentials,
f.write("[api_database]\n")
f.write(get_connection_string(db_credentials, 'nova_api'))
with open("/etc/aodh/aodh-dbsync.conf", "w") as f:
f.write("[database]\n")
f.write(get_connection_string(db_credentials, 'aodh'))
with open("/etc/murano/murano-dbsync.conf", "w") as f:
f.write("[database]\n")
f.write(get_connection_string(db_credentials, 'murano'))
@ -587,9 +580,6 @@ def migrate_databases(from_release, shared_services, db_credentials,
f.write(get_connection_string(db_credentials, 'barbican'))
migrate_commands = [
# Migrate aodh (new in R3)
('aodh',
'aodh-dbsync --config-file /etc/aodh/aodh-dbsync.conf'),
# Migrate barbican
('barbican',
'barbican-manage --config-file /etc/barbican/barbican-dbsync.conf ' +

View File

@ -62,8 +62,6 @@ rewrite r_rewrite_set{
set("<%= @system_name %> user.log ${HOST}", value("HOST") condition(filter(f_user)));
set("<%= @system_name %> uucp.log ${HOST}", value("HOST") condition(filter(f_uucp)));
set("<%= @system_name %> snmp-api.log ${HOST}", value("HOST") condition(filter(f_snmpat)));
set("<%= @system_name %> api.log ${HOST}", value("HOST") condition(filter(f_gnocchiapi)));
set("<%= @system_name %> metricd.log ${HOST}", value("HOST") condition(filter(f_gnocchimetricd)));
# Most logs write log level to the message field. some writes it to the PRIORITY field
# The priority field is not sent remotely. This is because tcp/udp destinations don't
# work well with templates, which we use to write the priority field to log files on the

View File

@ -27,7 +27,7 @@
# server functionality of fm-api.
#
# [*sync_db*]
# (optional) Run gnocchi-upgrade db sync on api nodes after installing the package.
# (optional) Run fm-dbsync on api nodes after installing the package.
# Defaults to false
#
# [*auth_strategy*]

View File

@ -55,10 +55,8 @@ systemconfig.puppet_plugins =
015_neutron = sysinv.puppet.neutron:NeutronPuppet
016_horizon = sysinv.puppet.horizon:HorizonPuppet
017_glance = sysinv.puppet.glance:GlancePuppet
018_gnocchi = sysinv.puppet.gnocchi:GnocchiPuppet
019_cinder = sysinv.puppet.cinder:CinderPuppet
020_ceilometer = sysinv.puppet.ceilometer:CeilometerPuppet
021_aodh = sysinv.puppet.aodh:AodhPuppet
022_heat = sysinv.puppet.heat:HeatPuppet
023_magnum = sysinv.puppet.magnum:MagnumPuppet
024_murano = sysinv.puppet.murano:MuranoPuppet

View File

@ -893,7 +893,6 @@ SERVICE_TYPE_PLATFORM = 'platform'
SERVICE_TYPE_NOVA = 'nova'
SERVICE_TYPE_SWIFT = 'swift'
SERVICE_TYPE_IRONIC = 'ironic'
SERVICE_TYPE_AODH = 'aodh'
SERVICE_TYPE_GLANCE = 'glance'
SERVICE_TYPE_BARBICAN = 'barbican'
SERVICE_TYPE_DOCKER = 'docker'
@ -1079,11 +1078,6 @@ SERVICE_PARAM_NAME_NOVA_PCI_ALIAS_USER = NOVA_PCI_ALIAS_USER_NAME
# default time to live seconds
PM_TTL_DEFAULT = 86400
# AODH Service Parameters
SERVICE_PARAM_SECTION_AODH_DATABASE = "database"
SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE = "alarm_history_time_to_live"
SERVICE_PARAM_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE_DEFAULT = PM_TTL_DEFAULT
SERVICE_PARAM_SECTION_SWIFT_CONFIG = 'config'
SERVICE_PARAM_NAME_SWIFT_SERVICE_ENABLED = 'service_enabled'
SERVICE_PARAM_NAME_SWIFT_FS_SIZE_MB = 'fs_size_mb'

View File

@ -598,13 +598,6 @@ def _validate_mnfa_timeout(name, value):
SERVICE_PARAM_PLAT_MTCE_MNFA_TIMEOUT_MAX)
# Validate range of Alarm History 'time to live' value
def _validate_alarm_history_time_to_live_range(name, value):
_validate_range(name, value,
SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE_MIN,
SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE_MAX)
def _validate_ipv4(name, value):
"""Check if router_id value is valid"""
if not netaddr.valid_ipv4(value):
@ -1454,25 +1447,6 @@ PLATFORM_MTCE_PARAMETER_RESOURCE = {
constants.SERVICE_PARAM_PLAT_MTCE_MNFA_TIMEOUT: 'platform::mtce::params::mnfa_timeout',
}
# 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
# AODH Service Parameters
AODH_PARAMETER_MANDATORY = [
constants.SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE,
]
AODH_PARAMETER_VALIDATOR = {
constants.SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE:
_validate_alarm_history_time_to_live_range,
}
AODH_PARAMETER_RESOURCE = {
constants.SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE:
'aodh::alarm_history_time_to_live',
}
SWIFT_CONFIG_PARAMETER_MANDATORY = [
constants.SERVICE_PARAM_NAME_SWIFT_SERVICE_ENABLED,
]
@ -1732,13 +1706,6 @@ SERVICE_PARAMETER_SCHEMA = {
SERVICE_PARAM_DATA_FORMAT: NOVA_PCI_ALIAS_PARAMETER_DATA_FORMAT,
},
},
constants.SERVICE_TYPE_AODH: {
constants.SERVICE_PARAM_SECTION_AODH_DATABASE: {
SERVICE_PARAM_MANDATORY: AODH_PARAMETER_MANDATORY,
SERVICE_PARAM_VALIDATOR: AODH_PARAMETER_VALIDATOR,
SERVICE_PARAM_RESOURCE: AODH_PARAMETER_RESOURCE,
},
},
constants.SERVICE_TYPE_SWIFT: {
constants.SERVICE_PARAM_SECTION_SWIFT_CONFIG: {
SERVICE_PARAM_MANDATORY: SWIFT_CONFIG_PARAMETER_MANDATORY,

View File

@ -493,11 +493,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_AODH,
'section': constants.SERVICE_PARAM_SECTION_AODH_DATABASE,
'name': constants.SERVICE_PARAM_NAME_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE,
'value': constants.SERVICE_PARAM_AODH_DATABASE_ALARM_HISTORY_TIME_TO_LIVE_DEFAULT,
},
{'service': constants.SERVICE_TYPE_SWIFT,
'section': constants.SERVICE_PARAM_SECTION_SWIFT_CONFIG,
'name': constants.SERVICE_PARAM_NAME_SWIFT_SERVICE_ENABLED,
@ -7185,13 +7180,6 @@ class ConductorManager(service.PeriodicService):
}
self._config_apply_runtime_manifest(context, config_uuid, config_dict)
elif service == constants.SERVICE_TYPE_AODH:
config_dict = {
"personalities": personalities,
"classes": ['openstack::aodh::runtime']
}
self._config_apply_runtime_manifest(context, config_uuid, config_dict)
elif service == constants.SERVICE_TYPE_SWIFT:
personalities = [constants.CONTROLLER]
config_dict = {

View File

@ -1,102 +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 AodhPuppet(openstack.OpenstackBasePuppet):
"""Class to encapsulate puppet operations for aodh configuration"""
SERVICE_NAME = 'aodh'
SERVICE_PORT = 8042
def get_static_config(self):
dbuser = self._get_database_username(self.SERVICE_NAME)
return {
'aodh::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 {
'aodh::db::postgresql::password': dbpass,
'aodh::keystone::auth::password': kspass,
'aodh::keystone::authtoken::password': kspass,
'aodh::auth::auth_password': kspass,
}
def get_system_config(self):
ksuser = self._get_service_user_name(self.SERVICE_NAME)
config = {
'aodh::keystone::auth::public_url': self.get_public_url(),
'aodh::keystone::auth::internal_url': self.get_internal_url(),
'aodh::keystone::auth::admin_url': self.get_admin_url(),
'aodh::keystone::auth::auth_name': ksuser,
'aodh::keystone::auth::region': self._region_name(),
'aodh::keystone::auth::tenant': self._get_service_tenant_name(),
'aodh::keystone::authtoken::auth_url':
self._keystone_identity_uri(),
'aodh::keystone::authtoken::auth_uri':
self._keystone_auth_uri(),
'aodh::keystone::authtoken::user_domain_name':
self._get_service_user_domain_name(),
'aodh::keystone::authtoken::project_domain_name':
self._get_service_project_domain_name(),
'aodh::keystone::authtoken::project_name':
self._get_service_tenant_name(),
'aodh::keystone::authtoken::region_name':
self._keystone_region_name(),
'aodh::keystone::authtoken::username': ksuser,
'aodh::auth::auth_url':
self._keystone_auth_uri(),
'aodh::auth::auth_tenant_name':
self._get_service_tenant_name(),
# auth_region needs to be where ceilometer client queries data
'aodh::auth::auth_region':
self._region_name(),
'aodh::auth::auth_user': ksuser,
'openstack::aodh::params::region_name':
self._get_service_region_name(self.SERVICE_NAME),
'openstack::aodh::params::service_create':
self._to_create_services(),
}
if (self._distributed_cloud_role() ==
constants.DISTRIBUTED_CLOUD_ROLE_SYSTEMCONTROLLER):
config.update({'openstack::aodh::params::service_enabled': False,
'aodh::keystone::auth::configure_endpoint': False})
return config
def get_secure_system_config(self):
config = {
'aodh::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)
def _get_neutron_url(self):
return self._operator.neutron.get_internal_url()

View File

@ -1,96 +0,0 @@
#
# Copyright (c) 2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sysinv.common import constants
from sysinv.puppet import openstack
class GnocchiPuppet(openstack.OpenstackBasePuppet):
"""Class to encapsulate puppet operations for gnocchi configuration"""
SERVICE_NAME = 'gnocchi'
SERVICE_PORT = 8041
def get_static_config(self):
dbuser = self._get_database_username(self.SERVICE_NAME)
return {
'gnocchi::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 {
'gnocchi::db::postgresql::password': dbpass,
'gnocchi::keystone::auth::password': kspass,
'gnocchi::keystone::authtoken::password': kspass,
}
def get_system_config(self):
ksuser = self._get_service_user_name(self.SERVICE_NAME)
config = {
'gnocchi::api::enabled': self._enable_gnocchi_api(),
'gnocchi::keystone::auth::region':
self._get_service_region_name(self.SERVICE_NAME),
'gnocchi::keystone::auth::public_url': self.get_public_url(),
'gnocchi::keystone::auth::internal_url': self.get_internal_url(),
'gnocchi::keystone::auth::admin_url': self.get_admin_url(),
'gnocchi::keystone::auth::auth_name': ksuser,
'gnocchi::keystone::auth::tenant': self._get_service_tenant_name(),
'gnocchi::keystone::authtoken::auth_url':
self._keystone_identity_uri(),
'gnocchi::keystone::authtoken::auth_uri':
self._keystone_auth_uri(),
'gnocchi::keystone::authtoken::user_domain_name':
self._get_service_user_domain_name(),
'gnocchi::keystone::authtoken::project_domain_name':
self._get_service_project_domain_name(),
'gnocchi::keystone::authtoken::project_name':
self._get_service_tenant_name(),
'gnocchi::keystone::authtoken::region_name':
self._keystone_region_name(),
'gnocchi::keystone::authtoken::username': ksuser,
'openstack::gnocchi::params::region_name':
self._get_service_region_name(self.SERVICE_NAME),
'openstack::gnocchi::params::service_create':
self._to_create_services(),
}
if (self._distributed_cloud_role() ==
constants.DISTRIBUTED_CLOUD_ROLE_SYSTEMCONTROLLER):
config.update({'openstack::gnocchi::params::service_enabled': False,
'gnocchi::keystone::auth::configure_endpoint': False})
return config
def get_secure_system_config(self):
config = {
'gnocchi::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)
def _enable_gnocchi_api(self):
if self._kubernetes_enabled():
return False
else:
return True