Clean up deprecated database parameters

Change-Id: I9d77ce1cbbd3fb8f7af2f144101ad064d760934e
This commit is contained in:
Takashi Kajinami 2022-02-07 12:01:36 +09:00
parent 8c660c594b
commit c543bd33ae
3 changed files with 23 additions and 94 deletions

View File

@ -70,33 +70,19 @@ class heat::db (
include heat::deps
if $::heat::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.')
}
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
# to use heat::<myparam> if heat::db::<myparam> isn't specified.
$database_connection_real = pick($::heat::database_connection, $database_connection)
$database_connection_recycle_time_real = pick($::heat::database_idle_timeout, $database_connection_recycle_time)
$database_max_pool_size_real = pick($::heat::database_max_pool_size, $database_max_pool_size)
$database_max_retries_real = pick($::heat::database_max_retries, $database_max_retries)
$database_retry_interval_real = pick($::heat::database_retry_interval, $database_retry_interval)
$database_max_overflow_real = pick($::heat::database_max_overflow, $database_max_overflow)
$sync_db_real = pick($::heat::sync_db, $sync_db)
oslo::db { 'heat_config':
connection => $database_connection_real,
connection_recycle_time => $database_connection_recycle_time_real,
max_pool_size => $database_max_pool_size_real,
max_retries => $database_max_retries_real,
retry_interval => $database_retry_interval_real,
max_overflow => $database_max_overflow_real,
connection => $database_connection,
connection_recycle_time => $database_connection_recycle_time,
max_pool_size => $database_max_pool_size,
max_retries => $database_max_retries,
retry_interval => $database_retry_interval,
max_overflow => $database_max_overflow,
pool_timeout => $database_pool_timeout,
mysql_enable_ndb => $mysql_enable_ndb,
db_max_retries => $database_db_max_retries,
}
if $sync_db_real {
if $sync_db {
include heat::db::sync
}

View File

@ -249,36 +249,6 @@
# take for evaluation.
# Defaults to $::os_service_default.
#
# 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 heat 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 undef.
#
# [*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.
#
# [*amqp_allow_insecure_clients*]
# (Optional) Accept clients using either SSL or plain TCP
# Defaults to undef.
@ -341,13 +311,6 @@ class heat(
$yaql_memory_quota = $::os_service_default,
$yaql_limit_iterators = $::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,
$sync_db = undef,
$amqp_allow_insecure_clients = undef,
$max_stacks_per_tenant = undef,
@ -362,42 +325,6 @@ class heat(
will be removed in a future release.')
}
if $database_connection != undef {
warning('The database_connection parameter is deprecated and will be \
removed in a future realse. Use heat::db::database_connection instead')
}
if $database_max_retries!= undef {
warning('The database_max_retries parameter is deprecated and will be \
removed in a future realse. Use heat::db::database_max_retries instead')
}
if $database_retry_interval != undef {
warning('The database_retry_interval parameter is deprecated and will be \
removed in a future realse. Use heat::db::database_retry_interval instead')
}
if $database_idle_timeout != undef {
warning('The database_idle_timeout parameter is deprecated and will be \
removed in a future realse. Use heat::db::database_connection_recycle_time \
instead')
}
if $database_max_pool_size != undef {
warning('The database_max_pool_size parameter is deprecated and will be \
removed in a future realse. Use heat::db::database_max_pool_size instead')
}
if $database_max_overflow != undef {
warning('The database_max_overflow parameter is deprecated and will be \
removed in a future realse. Use heat::db::database_max_overflow instead')
}
if $sync_db != undef {
warning('The sync_db prameter is deprecated and will be removed \
in a future release. Use heat::db::sync_db instead')
}
if $max_stacks_per_tenant != undef {
warning('The max_stacks_per_tenant parameter is deprecated. \
Use heat::engine::max_stacks_per_tenant instead.')

View File

@ -0,0 +1,16 @@
---
upgrade:
- |
The following parameters of the ``heat`` class has been removed.
- ``database_min_pool_size``
- ``database_connection``
- ``database_idle_timeout``
- ``database_max_overflow``
- ``database_max_pool_size``
- ``database_max_retries``
- ``database_retry_interval``
- |
The ``database_min_pool_size`` parameter of the ``heat::db`` class has been
removed.