From c543bd33ae2389e64f932441c719fcc105a2f2da Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 7 Feb 2022 12:01:36 +0900 Subject: [PATCH] Clean up deprecated database parameters Change-Id: I9d77ce1cbbd3fb8f7af2f144101ad064d760934e --- manifests/db.pp | 28 ++----- manifests/init.pp | 73 ------------------- ...move-database-params-f7bcf4be24f64a78.yaml | 16 ++++ 3 files changed, 23 insertions(+), 94 deletions(-) create mode 100644 releasenotes/notes/remove-database-params-f7bcf4be24f64a78.yaml diff --git a/manifests/db.pp b/manifests/db.pp index 3b8bd615..6a129c98 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -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:: if heat::db:: 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 } diff --git a/manifests/init.pp b/manifests/init.pp index b2114e25..979aaded 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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.') diff --git a/releasenotes/notes/remove-database-params-f7bcf4be24f64a78.yaml b/releasenotes/notes/remove-database-params-f7bcf4be24f64a78.yaml new file mode 100644 index 00000000..6645c11a --- /dev/null +++ b/releasenotes/notes/remove-database-params-f7bcf4be24f64a78.yaml @@ -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.