Deprecate min_pool_size option
min_pool_size option is not used,see: https://review.opendev.org/#/c/565090/ Change-Id: I67e5c96a70ae4ebb6934129286516a24c5a22fbf Closes-Bug: #1868511
This commit is contained in:
parent
16d279e21e
commit
ca939e9732
|
@ -67,10 +67,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.
|
||||
|
@ -316,6 +312,10 @@
|
|||
# properties.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*database_min_pool_size*]
|
||||
# (optional) Minimum number of SQL connections to keep open in a pool.
|
||||
# Defaults to undef.
|
||||
#
|
||||
class glance::api(
|
||||
$package_ensure = 'present',
|
||||
$bind_host = $::os_service_default,
|
||||
|
@ -343,7 +343,6 @@ class glance::api(
|
|||
$default_backend = undef,
|
||||
$database_connection = undef,
|
||||
$database_idle_timeout = undef,
|
||||
$database_min_pool_size = undef,
|
||||
$database_max_pool_size = undef,
|
||||
$database_max_retries = undef,
|
||||
$database_retry_interval = undef,
|
||||
|
@ -385,6 +384,7 @@ class glance::api(
|
|||
$registry_port = undef,
|
||||
$registry_client_protocol = undef,
|
||||
$show_multiple_locations = undef,
|
||||
$database_min_pool_size = undef,
|
||||
) inherits glance {
|
||||
|
||||
include glance::deps
|
||||
|
|
|
@ -17,10 +17,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.
|
||||
|
@ -42,26 +38,36 @@
|
|||
# (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 glance::api::db (
|
||||
$database_db_max_retries = $::os_service_default,
|
||||
$database_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
||||
$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 glance::deps
|
||||
|
||||
if $::glance::api::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(degorenko): In order to keep backward compatibility we rely on the pick function
|
||||
# to use glance::api::<myparam> if glance::api::db::<myparam> isn't specified.
|
||||
$database_connection_real = pick($::glance::api::database_connection, $database_connection)
|
||||
$database_connection_recycle_time_real = pick($::glance::api::database_idle_timeout,
|
||||
$database_connection_recycle_time)
|
||||
$database_min_pool_size_real = pick($::glance::api::database_min_pool_size, $database_min_pool_size)
|
||||
$database_max_pool_size_real = pick($::glance::api::database_max_pool_size, $database_max_pool_size)
|
||||
$database_max_retries_real = pick($::glance::api::database_max_retries, $database_max_retries)
|
||||
$database_retry_interval_real = pick($::glance::api::database_retry_interval, $database_retry_interval)
|
||||
|
@ -74,7 +80,6 @@ class glance::api::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_retries => $database_max_retries_real,
|
||||
retry_interval => $database_retry_interval_real,
|
||||
max_pool_size => $database_max_pool_size_real,
|
||||
|
|
|
@ -38,10 +38,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.
|
||||
|
@ -96,6 +92,12 @@
|
|||
# should be set 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 glance::registry(
|
||||
$package_ensure = 'present',
|
||||
$bind_host = $::os_service_default,
|
||||
|
@ -103,7 +105,6 @@ class glance::registry(
|
|||
$workers = $::os_workers,
|
||||
$database_connection = undef,
|
||||
$database_idle_timeout = undef,
|
||||
$database_min_pool_size = undef,
|
||||
$database_max_pool_size = undef,
|
||||
$database_max_retries = undef,
|
||||
$database_retry_interval = undef,
|
||||
|
@ -118,6 +119,8 @@ class glance::registry(
|
|||
$ca_file = $::os_service_default,
|
||||
$os_region_name = $::os_service_default,
|
||||
$enable_v1_registry = false,
|
||||
# DEPRECATED PARAMETERS
|
||||
$database_min_pool_size = undef,
|
||||
) inherits glance {
|
||||
|
||||
warning('glance::registry is deprecated, and will be removed in a future release')
|
||||
|
|
|
@ -17,10 +17,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.
|
||||
|
@ -42,26 +38,36 @@
|
|||
# (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 glance::registry::db (
|
||||
$database_db_max_retries = $::os_service_default,
|
||||
$database_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
||||
$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 = $::os_service_default,
|
||||
) {
|
||||
|
||||
include glance::deps
|
||||
|
||||
if $::glance::registry::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(degorenko): In order to keep backward compatibility we rely on the pick function
|
||||
# to use glance::registry::<myparam> if glance::registry::db::<myparam> isn't specified.
|
||||
$database_connection_real = pick($::glance::registry::database_connection, $database_connection)
|
||||
$database_connection_recycle_time_real = pick($::glance::registry::database_idle_timeout,
|
||||
$database_connection_recycle_time)
|
||||
$database_min_pool_size_real = pick($::glance::registry::database_min_pool_size, $database_min_pool_size)
|
||||
$database_max_pool_size_real = pick($::glance::registry::database_max_pool_size, $database_max_pool_size)
|
||||
$database_max_retries_real = pick($::glance::registry::database_max_retries, $database_max_retries)
|
||||
$database_retry_interval_real = pick($::glance::registry::database_retry_interval, $database_retry_interval)
|
||||
|
@ -74,7 +80,6 @@ class glance::registry::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_retries => $database_max_retries_real,
|
||||
retry_interval => $database_retry_interval_real,
|
||||
max_pool_size => $database_max_pool_size_real,
|
||||
|
|
|
@ -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 'glance::api::db' do
|
|||
:db_max_retries => '<SERVICE DEFAULT>',
|
||||
:connection => 'sqlite:///var/lib/glance/glance.sqlite',
|
||||
:connection_recycle_time => '<SERVICE DEFAULT>',
|
||||
:min_pool_size => '<SERVICE DEFAULT>',
|
||||
:max_pool_size => '<SERVICE DEFAULT>',
|
||||
:max_retries => '<SERVICE DEFAULT>',
|
||||
:retry_interval => '<SERVICE DEFAULT>',
|
||||
|
@ -23,7 +22,6 @@ describe 'glance::api::db' do
|
|||
{
|
||||
:database_connection => 'mysql+pymysql://glance_api:glance@localhost/glance',
|
||||
:database_connection_recycle_time => '3601',
|
||||
:database_min_pool_size => '2',
|
||||
:database_max_retries => '11',
|
||||
:database_db_max_retries => '-1',
|
||||
:database_retry_interval => '11',
|
||||
|
@ -38,7 +36,6 @@ describe 'glance::api::db' do
|
|||
it { should contain_oslo__db('glance_api_config').with(
|
||||
:connection => 'mysql+pymysql://glance_api:glance@localhost/glance',
|
||||
:connection_recycle_time => '3601',
|
||||
:min_pool_size => '2',
|
||||
:max_pool_size => '11',
|
||||
:max_retries => '11',
|
||||
:db_max_retries => '-1',
|
||||
|
|
|
@ -9,7 +9,6 @@ describe 'glance::registry::db' do
|
|||
:db_max_retries => '<SERVICE DEFAULT>',
|
||||
:connection => 'sqlite:///var/lib/glance/glance.sqlite',
|
||||
:connection_recycle_time => '<SERVICE DEFAULT>',
|
||||
:min_pool_size => '<SERVICE DEFAULT>',
|
||||
:max_pool_size => '<SERVICE DEFAULT>',
|
||||
:max_retries => '<SERVICE DEFAULT>',
|
||||
:retry_interval => '<SERVICE DEFAULT>',
|
||||
|
@ -24,7 +23,6 @@ describe 'glance::registry::db' do
|
|||
:database_db_max_retries => '-1',
|
||||
:database_connection => 'mysql+pymysql://glance_registry:glance@localhost/glance',
|
||||
:database_connection_recycle_time => '3601',
|
||||
:database_min_pool_size => '2',
|
||||
:database_max_retries => '11',
|
||||
:database_retry_interval => '11',
|
||||
:database_max_pool_size => '11',
|
||||
|
@ -39,7 +37,6 @@ describe 'glance::registry::db' do
|
|||
:db_max_retries => '-1',
|
||||
:connection => 'mysql+pymysql://glance_registry:glance@localhost/glance',
|
||||
:connection_recycle_time => '3601',
|
||||
:min_pool_size => '2',
|
||||
:max_pool_size => '11',
|
||||
:max_retries => '11',
|
||||
:retry_interval => '11',
|
||||
|
|
Loading…
Reference in New Issue