Deprecate min_pool_size option
min_pool_size option is not used,see: https://review.opendev.org/#/c/565090/ Change-Id: Iadbaa88680a15687c1e4af8a28db74a0794531ea Closes-Bug: #1868511
This commit is contained in:
parent
030de21192
commit
ea60281eee
|
@ -21,10 +21,6 @@
|
||||||
# Timeout when db connections should be reaped.
|
# Timeout when db connections should be reaped.
|
||||||
# (Optional) Defaults to $::os_service_default.
|
# (Optional) Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*database_min_pool_size*]
|
|
||||||
# Minimum number of SQL connections to keep open in a pool.
|
|
||||||
# (Optional) Defaults to $::os_service_default.
|
|
||||||
#
|
|
||||||
# [*database_max_pool_size*]
|
# [*database_max_pool_size*]
|
||||||
# Maximum number of SQL connections to keep open in a pool.
|
# Maximum number of SQL connections to keep open in a pool.
|
||||||
# (Optional) Defaults to $::os_service_default.
|
# (Optional) Defaults to $::os_service_default.
|
||||||
|
@ -46,24 +42,34 @@
|
||||||
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
||||||
# Defaults to $::os_service_default
|
# 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 aodh::db (
|
class aodh::db (
|
||||||
$database_db_max_retries = $::os_service_default,
|
$database_db_max_retries = $::os_service_default,
|
||||||
$database_connection = 'sqlite:////var/lib/aodh/aodh.sqlite',
|
$database_connection = 'sqlite:////var/lib/aodh/aodh.sqlite',
|
||||||
$slave_connection = $::os_service_default,
|
$slave_connection = $::os_service_default,
|
||||||
$database_connection_recycle_time = $::os_service_default,
|
$database_connection_recycle_time = $::os_service_default,
|
||||||
$database_min_pool_size = $::os_service_default,
|
|
||||||
$database_max_pool_size = $::os_service_default,
|
$database_max_pool_size = $::os_service_default,
|
||||||
$database_max_retries = $::os_service_default,
|
$database_max_retries = $::os_service_default,
|
||||||
$database_retry_interval = $::os_service_default,
|
$database_retry_interval = $::os_service_default,
|
||||||
$database_max_overflow = $::os_service_default,
|
$database_max_overflow = $::os_service_default,
|
||||||
$database_pool_timeout = $::os_service_default,
|
$database_pool_timeout = $::os_service_default,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$database_min_pool_size = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include aodh::deps
|
include aodh::deps
|
||||||
|
|
||||||
|
if $::aodh::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.')
|
||||||
|
}
|
||||||
|
|
||||||
$database_connection_real = pick($::aodh::database_connection, $database_connection)
|
$database_connection_real = pick($::aodh::database_connection, $database_connection)
|
||||||
$slave_connection_real = pick($::aodh::slave_connection, $slave_connection)
|
$slave_connection_real = pick($::aodh::slave_connection, $slave_connection)
|
||||||
$database_min_pool_size_real = pick($::aodh::database_min_pool_size, $database_min_pool_size)
|
|
||||||
$database_max_pool_size_real = pick($::aodh::database_max_pool_size, $database_max_pool_size)
|
$database_max_pool_size_real = pick($::aodh::database_max_pool_size, $database_max_pool_size)
|
||||||
$database_max_retries_real = pick($::aodh::database_max_retries, $database_max_retries)
|
$database_max_retries_real = pick($::aodh::database_max_retries, $database_max_retries)
|
||||||
$database_retry_interval_real = pick($::aodh::database_retry_interval, $database_retry_interval)
|
$database_retry_interval_real = pick($::aodh::database_retry_interval, $database_retry_interval)
|
||||||
|
@ -75,7 +81,6 @@ class aodh::db (
|
||||||
connection => $database_connection_real,
|
connection => $database_connection_real,
|
||||||
slave_connection => $slave_connection_real,
|
slave_connection => $slave_connection_real,
|
||||||
connection_recycle_time => $database_connection_recycle_time_real,
|
connection_recycle_time => $database_connection_recycle_time_real,
|
||||||
min_pool_size => $database_min_pool_size_real,
|
|
||||||
max_pool_size => $database_max_pool_size_real,
|
max_pool_size => $database_max_pool_size_real,
|
||||||
max_retries => $database_max_retries_real,
|
max_retries => $database_max_retries_real,
|
||||||
retry_interval => $database_retry_interval_real,
|
retry_interval => $database_retry_interval_real,
|
||||||
|
|
|
@ -204,10 +204,6 @@
|
||||||
# (optional) Interval between retries of opening a database connection.
|
# (optional) Interval between retries of opening a database connection.
|
||||||
# Defaults to undef.
|
# Defaults to undef.
|
||||||
#
|
#
|
||||||
# [*database_min_pool_size*]
|
|
||||||
# (optional) Minimum number of SQL connections to keep open in a pool.
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*database_max_pool_size*]
|
# [*database_max_pool_size*]
|
||||||
# (optional) Maximum number of SQL connections to keep open in a pool.
|
# (optional) Maximum number of SQL connections to keep open in a pool.
|
||||||
# Defaults to undef.
|
# Defaults to undef.
|
||||||
|
@ -221,6 +217,12 @@
|
||||||
# in the aodh config.
|
# in the aodh config.
|
||||||
# Defaults to false.
|
# Defaults to false.
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*database_min_pool_size*]
|
||||||
|
# (optional) Minimum number of SQL connections to keep open in a pool.
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
class aodh (
|
class aodh (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$alarm_history_time_to_live = $::os_service_default,
|
$alarm_history_time_to_live = $::os_service_default,
|
||||||
|
@ -263,12 +265,13 @@ class aodh (
|
||||||
$database_connection = undef,
|
$database_connection = undef,
|
||||||
$slave_connection = undef,
|
$slave_connection = undef,
|
||||||
$database_idle_timeout = undef,
|
$database_idle_timeout = undef,
|
||||||
$database_min_pool_size = undef,
|
|
||||||
$database_max_pool_size = undef,
|
$database_max_pool_size = undef,
|
||||||
$database_max_retries = undef,
|
$database_max_retries = undef,
|
||||||
$database_retry_interval = undef,
|
$database_retry_interval = undef,
|
||||||
$database_max_overflow = undef,
|
$database_max_overflow = undef,
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$database_min_pool_size = undef,
|
||||||
) inherits aodh::params {
|
) inherits aodh::params {
|
||||||
|
|
||||||
include aodh::deps
|
include aodh::deps
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- database_min_pool_size option is now deprecated for removal, the
|
||||||
|
parameter has no effect.
|
|
@ -9,7 +9,6 @@ describe 'aodh::db' do
|
||||||
:db_max_retries => '<SERVICE DEFAULT>',
|
:db_max_retries => '<SERVICE DEFAULT>',
|
||||||
:connection => 'sqlite:////var/lib/aodh/aodh.sqlite',
|
:connection => 'sqlite:////var/lib/aodh/aodh.sqlite',
|
||||||
:connection_recycle_time => '<SERVICE DEFAULT>',
|
:connection_recycle_time => '<SERVICE DEFAULT>',
|
||||||
:min_pool_size => '<SERVICE DEFAULT>',
|
|
||||||
:max_pool_size => '<SERVICE DEFAULT>',
|
:max_pool_size => '<SERVICE DEFAULT>',
|
||||||
:max_retries => '<SERVICE DEFAULT>',
|
:max_retries => '<SERVICE DEFAULT>',
|
||||||
:retry_interval => '<SERVICE DEFAULT>',
|
:retry_interval => '<SERVICE DEFAULT>',
|
||||||
|
@ -25,7 +24,6 @@ describe 'aodh::db' do
|
||||||
:database_connection => 'mysql+pymysql://aodh:aodh@localhost/aodh',
|
:database_connection => 'mysql+pymysql://aodh:aodh@localhost/aodh',
|
||||||
:slave_connection => 'mysql+pymysql://aodh:aodh@localhost2/aodh',
|
:slave_connection => 'mysql+pymysql://aodh:aodh@localhost2/aodh',
|
||||||
:database_connection_recycle_time => '3601',
|
:database_connection_recycle_time => '3601',
|
||||||
:database_min_pool_size => '2',
|
|
||||||
:database_max_pool_size => '11',
|
:database_max_pool_size => '11',
|
||||||
:database_max_retries => '11',
|
:database_max_retries => '11',
|
||||||
:database_retry_interval => '11',
|
:database_retry_interval => '11',
|
||||||
|
@ -41,7 +39,6 @@ describe 'aodh::db' do
|
||||||
:connection => 'mysql+pymysql://aodh:aodh@localhost/aodh',
|
:connection => 'mysql+pymysql://aodh:aodh@localhost/aodh',
|
||||||
:slave_connection => 'mysql+pymysql://aodh:aodh@localhost2/aodh',
|
:slave_connection => 'mysql+pymysql://aodh:aodh@localhost2/aodh',
|
||||||
:connection_recycle_time => '3601',
|
:connection_recycle_time => '3601',
|
||||||
:min_pool_size => '2',
|
|
||||||
:max_pool_size => '11',
|
:max_pool_size => '11',
|
||||||
:max_retries => '11',
|
:max_retries => '11',
|
||||||
:retry_interval => '11',
|
:retry_interval => '11',
|
||||||
|
|
Loading…
Reference in New Issue