From 8993e81274c01c38a24366f94eccba6eae522d81 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Tue, 23 Jun 2020 13:07:31 +0200 Subject: [PATCH] Remove deprecated neutron database params Depends-On: https://review.opendev.org/737544 Change-Id: I0f962637a13db9c3151a3c27530e97f15b0a4f59 --- manifests/db.pp | 39 ++++--------------- manifests/server.pp | 35 ----------------- ...-deprecated-database-095127d35fa70e40.yaml | 9 +++++ 3 files changed, 17 insertions(+), 66 deletions(-) create mode 100644 releasenotes/notes/remove-deprecated-database-095127d35fa70e40.yaml diff --git a/manifests/db.pp b/manifests/db.pp index 46984ed01..b1a9e0b28 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -38,12 +38,6 @@ # before error is raised. Set to -1 to specify an infinite retry count. # Defaults to $::os_service_default # -# DEPRECATED PARAMETERS -# -# [*database_min_pool_size*] -# Minimum number of SQL connections to keep open in a pool. -# (Optional) Defaults to undef. -# class neutron::db ( $database_connection = 'sqlite:////var/lib/neutron/ovs.sqlite', $database_connection_recycle_time = $::os_service_default, @@ -53,39 +47,22 @@ class neutron::db ( $database_max_overflow = $::os_service_default, $database_pool_timeout = $::os_service_default, $database_db_max_retries = $::os_service_default, - # DEPRECATED PARAMETERS - $database_min_pool_size = undef, ) { include neutron::deps - if $::neutron::server::database_min_pool_size or $database_min_pool_size { - warning('The database_min_pool_size parameter is deprecated, and will be removed in a future release.') - } - - # TODO(tobias-urdin): Remove the database_* params in neutron::server is removed. - # NOTE(spredzy): In order to keep backward compatibility we rely on the pick function - # to use neutron:: if neutron::db:: isn't specified. - $database_connection_real = pick($::neutron::server::database_connection, $database_connection) - $database_connection_recycle_time_real = pick($::neutron::server::database_idle_timeout, - $database_connection_recycle_time) - $database_max_pool_size_real = pick($::neutron::server::database_max_pool_size, $database_max_pool_size) - $database_max_retries_real = pick($::neutron::server::database_max_retries, $database_max_retries) - $database_retry_interval_real = pick($::neutron::server::database_retry_interval, $database_retry_interval) - $database_max_overflow_real = pick($::neutron::server::database_max_overflow, $database_max_overflow) - - validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection_real, + validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection, ['^(sqlite|mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?']) - if $database_connection_real { + if $database_connection { oslo::db { 'neutron_config': - connection => $database_connection_real, - connection_recycle_time => $database_connection_recycle_time_real, - max_retries => $database_max_retries_real, - retry_interval => $database_retry_interval_real, - max_pool_size => $database_max_pool_size_real, - max_overflow => $database_max_overflow_real, + connection => $database_connection, + connection_recycle_time => $database_connection_recycle_time, + max_retries => $database_max_retries, + retry_interval => $database_retry_interval, + max_pool_size => $database_max_pool_size, + max_overflow => $database_max_overflow, pool_timeout => $database_pool_timeout, db_max_retries => $database_db_max_retries, } diff --git a/manifests/server.pp b/manifests/server.pp index c3c5859ee..99f6f49ae 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -227,34 +227,6 @@ # # DEPRECATED PARAMETERS # -# [*database_min_pool_size*] -# (Optional) Minimum number of SQL connections to keep open in a pool. -# Defaults to: undef. -# -# [*database_connection*] -# (Optional) Connection url for the neutron database. -# (Defaults to undef) -# -# [*database_max_retries*] -# (Optional) Maximum database connection retries during startup. -# (Defaults to undef) -# -# [*database_idle_timeout*] -# (Optional) Timeout before idle database connections are reaped. -# (Defaults to undef) -# -# [*database_retry_interval*] -# (Optional) Interval between retries of opening a database connection. -# (Defaults to 10) -# -# [*database_max_pool_size*] -# (Optional) Maximum number of SQL connections to keep open in a pool. -# Defaults to: undef. -# -# [*database_max_overflow*] -# (Optional) If set, use this value for max_overflow with sqlalchemy. -# Defaults to: undef. -# # [*ensure_fwaas_package*] # (Optional) Ensures installation of FWaaS package before starting API service. # Set to true to ensure installation of the package that is required to start neutron service if service_plugin is enabled. @@ -299,13 +271,6 @@ class neutron::server ( $ovs_integration_bridge = $::os_service_default, $igmp_snooping_enable = $::os_service_default, # DEPRECATED PARAMETERS - $database_min_pool_size = undef, - $database_connection = undef, - $database_max_retries = undef, - $database_idle_timeout = undef, - $database_retry_interval = undef, - $database_max_pool_size = undef, - $database_max_overflow = undef, $ensure_fwaas_package = undef, ) inherits ::neutron::params { diff --git a/releasenotes/notes/remove-deprecated-database-095127d35fa70e40.yaml b/releasenotes/notes/remove-deprecated-database-095127d35fa70e40.yaml new file mode 100644 index 000000000..7a059812e --- /dev/null +++ b/releasenotes/notes/remove-deprecated-database-095127d35fa70e40.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + The neutron::server::database_min_pool_size and + neutron::db::database_min_pool_size parameters is removed. + - | + The database_connection, database_max_retries, database_idle_timeout, + database_retry_interval, database_max_pool_size and database_max_overflow + parameters in neutron::server is removed, use the neutron::db class instead.