Deprecate min_pool_size option
min_pool_size option is not used,see: https://review.opendev.org/#/c/565090/ Change-Id: I8e03215cabfc837d3a0145b9a38edfef5f35e386 Closes-Bug: #1868511
This commit is contained in:
parent
abc57251bd
commit
413f46a089
@ -46,10 +46,6 @@
|
||||
# Timeout when db connections should be reaped.
|
||||
# (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*]
|
||||
# Maximum number of SQL connections to keep open in a pool.
|
||||
# (Optional) Defaults to $::os_service_default
|
||||
@ -71,6 +67,12 @@
|
||||
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
||||
# 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 nova::db (
|
||||
$database_db_max_retries = $::os_service_default,
|
||||
$database_connection = $::os_service_default,
|
||||
@ -78,17 +80,22 @@ class nova::db (
|
||||
$api_database_connection = $::os_service_default,
|
||||
$api_slave_connection = $::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_retries = $::os_service_default,
|
||||
$database_retry_interval = $::os_service_default,
|
||||
$database_max_overflow = $::os_service_default,
|
||||
$database_pool_timeout = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$database_min_pool_size = undef,
|
||||
) {
|
||||
|
||||
include nova::deps
|
||||
include nova::params
|
||||
|
||||
if $::nova::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 nova::<myparam> first the nova::db::<myparam>
|
||||
$database_connection_real = pick($::nova::database_connection, $database_connection)
|
||||
@ -96,7 +103,6 @@ class nova::db (
|
||||
$api_database_connection_real = pick($::nova::api_database_connection, $api_database_connection)
|
||||
$api_slave_connection_real = pick($::nova::api_slave_connection, $api_slave_connection)
|
||||
$database_connection_recycle_time_real = pick($::nova::database_idle_timeout, $database_connection_recycle_time)
|
||||
$database_min_pool_size_real = pick($::nova::database_min_pool_size, $database_min_pool_size)
|
||||
$database_max_pool_size_real = pick($::nova::database_max_pool_size, $database_max_pool_size)
|
||||
$database_max_retries_real = pick($::nova::database_max_retries, $database_max_retries)
|
||||
$database_retry_interval_real = pick($::nova::database_retry_interval, $database_retry_interval)
|
||||
@ -111,7 +117,6 @@ class nova::db (
|
||||
db_max_retries => $database_db_max_retries,
|
||||
connection => $database_connection_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_retries => $database_max_retries_real,
|
||||
retry_interval => $database_retry_interval_real,
|
||||
|
@ -37,10 +37,6 @@
|
||||
# (optional) Interval between retries of opening a database connection.
|
||||
# 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*]
|
||||
# (optional) Maximum number of SQL connections to keep open in a pool.
|
||||
# Defaults to undef.
|
||||
@ -436,6 +432,10 @@
|
||||
# (optional) List of addresses for api servers.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*database_min_pool_size*]
|
||||
# (optional) Minimum number of SQL connections to keep open in a pool.
|
||||
# Defaults to undef.
|
||||
#
|
||||
class nova(
|
||||
$ensure_package = 'present',
|
||||
$database_connection = undef,
|
||||
@ -445,7 +445,6 @@ class nova(
|
||||
$block_device_allocate_retries = $::os_service_default,
|
||||
$block_device_allocate_retries_interval = $::os_service_default,
|
||||
$database_idle_timeout = undef,
|
||||
$database_min_pool_size = undef,
|
||||
$database_max_pool_size = undef,
|
||||
$database_max_retries = undef,
|
||||
$database_retry_interval = undef,
|
||||
@ -530,6 +529,7 @@ class nova(
|
||||
$notify_on_api_faults = undef,
|
||||
$auth_strategy = undef,
|
||||
$glance_api_servers = undef,
|
||||
$database_min_pool_size = undef,
|
||||
) inherits nova::params {
|
||||
|
||||
include nova::deps
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
deprecations:
|
||||
- database_min_pool_size option is now deprecated for removal, the
|
||||
parameter has no effect.
|
@ -13,7 +13,6 @@ describe 'nova::db' do
|
||||
it { should_not contain_nova_config('api_database/connection') }
|
||||
it { should_not contain_nova_config('api_database/slave_connection') }
|
||||
it { should_not contain_nova_config('database/connection_recycle_time') }
|
||||
it { should_not contain_nova_config('database/min_pool_size') }
|
||||
it { should_not contain_nova_config('database/max_pool_size') }
|
||||
it { should_not contain_nova_config('database/max_retries') }
|
||||
it { should_not contain_nova_config('database/retry_interval') }
|
||||
@ -36,7 +35,6 @@ describe 'nova::db' do
|
||||
:slave_connection => 'mysql+pymysql://user:pass@slave/db1',
|
||||
:db_max_retries => '<SERVICE DEFAULT>',
|
||||
:connection_recycle_time => '<SERVICE DEFAULT>',
|
||||
:min_pool_size => '<SERVICE DEFAULT>',
|
||||
:max_pool_size => '<SERVICE DEFAULT>',
|
||||
:max_retries => '<SERVICE DEFAULT>',
|
||||
:retry_interval => '<SERVICE DEFAULT>',
|
||||
|
Loading…
x
Reference in New Issue
Block a user