Deprecate min_pool_size option
min_pool_size option is not used,see: https://review.opendev.org/#/c/565090/ Change-Id: Iead3c6521de9d779845c44d9117b396e3348a8ec Closes-Bug: #1868511
This commit is contained in:
parent
fea5f45996
commit
66705cb49a
|
@ -21,10 +21,6 @@
|
||||||
# (optional) Interval between retries of opening a database connection.
|
# (optional) Interval between retries of opening a database connection.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*database_min_pool_size*]
|
|
||||||
# (optional) Minimum number of SQL connections to keep open in a pool.
|
|
||||||
# Defaults to $::os_service_default.
|
|
||||||
#
|
|
||||||
# [*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 $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
|
@ -42,25 +38,35 @@
|
||||||
# before error is raised. Set to -1 to specify an infinite retry count.
|
# before error is raised. Set to -1 to specify an infinite retry count.
|
||||||
# Defaults to $::os_service_default
|
# 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.
|
||||||
|
#
|
||||||
class murano::db (
|
class murano::db (
|
||||||
$database_connection = 'mysql+pymysql://murano:secrete@localhost:3306/murano',
|
$database_connection = 'mysql+pymysql://murano:secrete@localhost:3306/murano',
|
||||||
$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,
|
||||||
$database_db_max_retries = $::os_service_default,
|
$database_db_max_retries = $::os_service_default,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$database_min_pool_size = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include murano::deps
|
include murano::deps
|
||||||
|
|
||||||
|
if $::murano::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(aderyugin): In order to keep backward compatibility we rely on the pick function
|
# NOTE(aderyugin): In order to keep backward compatibility we rely on the pick function
|
||||||
# to use murano::<myparam> if murano::db::<myparam> isn't specified.
|
# to use murano::<myparam> if murano::db::<myparam> isn't specified.
|
||||||
$database_connection_real = pick($::murano::database_connection, $database_connection)
|
$database_connection_real = pick($::murano::database_connection, $database_connection)
|
||||||
$database_connection_recycle_time_real = pick($::murano::database_idle_timeout, $database_connection_recycle_time)
|
$database_connection_recycle_time_real = pick($::murano::database_idle_timeout, $database_connection_recycle_time)
|
||||||
$database_min_pool_size_real = pick($::murano::database_min_pool_size, $database_min_pool_size)
|
|
||||||
$database_max_pool_size_real = pick($::murano::database_max_pool_size, $database_max_pool_size)
|
$database_max_pool_size_real = pick($::murano::database_max_pool_size, $database_max_pool_size)
|
||||||
$database_max_retries_real = pick($::murano::database_max_retries, $database_max_retries)
|
$database_max_retries_real = pick($::murano::database_max_retries, $database_max_retries)
|
||||||
$database_retry_interval_real = pick($::murano::database_retry_interval, $database_retry_interval)
|
$database_retry_interval_real = pick($::murano::database_retry_interval, $database_retry_interval)
|
||||||
|
@ -72,7 +78,6 @@ class murano::db (
|
||||||
oslo::db { 'murano_config':
|
oslo::db { 'murano_config':
|
||||||
connection => $database_connection_real,
|
connection => $database_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,
|
||||||
|
|
|
@ -21,10 +21,6 @@
|
||||||
# (optional) Interval between retries of opening a database connection.
|
# (optional) Interval between retries of opening a database connection.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*database_min_pool_size*]
|
|
||||||
# (optional) Minimum number of SQL connections to keep open in a pool.
|
|
||||||
# Defaults to $::os_service_default.
|
|
||||||
#
|
|
||||||
# [*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 $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
|
@ -38,19 +34,30 @@
|
||||||
# before error is raised. Set to -1 to specify an infinite retry count.
|
# before error is raised. Set to -1 to specify an infinite retry count.
|
||||||
# Defaults to $::os_service_default
|
# 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.
|
||||||
|
#
|
||||||
class murano::db_cfapi (
|
class murano::db_cfapi (
|
||||||
$database_connection = $::os_service_default,
|
$database_connection = $::os_service_default,
|
||||||
$database_idle_timeout = $::os_service_default,
|
$database_idle_timeout = $::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_db_max_retries = $::os_service_default,
|
$database_db_max_retries = $::os_service_default,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$database_min_pool_size = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include murano::deps
|
include murano::deps
|
||||||
|
|
||||||
|
if $database_min_pool_size {
|
||||||
|
warning('The database_min_pool_size parameter is deprecated, and will be removed in a future release.')
|
||||||
|
}
|
||||||
|
|
||||||
if !is_service_default($database_connection) {
|
if !is_service_default($database_connection) {
|
||||||
|
|
||||||
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection,
|
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection,
|
||||||
|
@ -59,7 +66,6 @@ class murano::db_cfapi (
|
||||||
oslo::db { 'murano_cfapi_config':
|
oslo::db { 'murano_cfapi_config':
|
||||||
connection => $database_connection,
|
connection => $database_connection,
|
||||||
idle_timeout => $database_idle_timeout,
|
idle_timeout => $database_idle_timeout,
|
||||||
min_pool_size => $database_min_pool_size,
|
|
||||||
max_pool_size => $database_max_pool_size,
|
max_pool_size => $database_max_pool_size,
|
||||||
max_retries => $database_max_retries,
|
max_retries => $database_max_retries,
|
||||||
retry_interval => $database_retry_interval,
|
retry_interval => $database_retry_interval,
|
||||||
|
|
|
@ -190,10 +190,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.
|
||||||
|
@ -247,6 +243,10 @@
|
||||||
# (Optional) Admin identity endpoint
|
# (Optional) Admin identity endpoint
|
||||||
# Defaults to 'http://127.0.0.1:5000/'
|
# Defaults to 'http://127.0.0.1:5000/'
|
||||||
#
|
#
|
||||||
|
# [*database_min_pool_size*]
|
||||||
|
# (optional) Minimum number of SQL connections to keep open in a pool.
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
class murano(
|
class murano(
|
||||||
$admin_password,
|
$admin_password,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
|
@ -288,7 +288,6 @@ class murano(
|
||||||
$packages_service = $::os_service_default,
|
$packages_service = $::os_service_default,
|
||||||
$database_connection = undef,
|
$database_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,
|
||||||
|
@ -304,6 +303,7 @@ class murano(
|
||||||
$amqp_durable_queues = $::os_service_default,
|
$amqp_durable_queues = $::os_service_default,
|
||||||
# Deprecated
|
# Deprecated
|
||||||
$identity_uri = 'http://127.0.0.1:5000/',
|
$identity_uri = 'http://127.0.0.1:5000/',
|
||||||
|
$database_min_pool_size = undef,
|
||||||
) inherits murano::params {
|
) inherits murano::params {
|
||||||
|
|
||||||
include murano::deps
|
include murano::deps
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- database_min_pool_size option is now deprecated for removal, the
|
||||||
|
parameter has no effect.
|
|
@ -7,7 +7,6 @@ describe 'murano::db_cfapi' do
|
||||||
context 'with default parameters' do
|
context 'with default parameters' do
|
||||||
it { is_expected.to_not contain_murano_cfapi_config('database/connection') }
|
it { is_expected.to_not contain_murano_cfapi_config('database/connection') }
|
||||||
it { is_expected.to_not contain_murano_cfapi_config('database/idle_timeout') }
|
it { is_expected.to_not contain_murano_cfapi_config('database/idle_timeout') }
|
||||||
it { is_expected.to_not contain_murano_cfapi_config('database/min_pool_size') }
|
|
||||||
it { is_expected.to_not contain_murano_cfapi_config('database/max_retries') }
|
it { is_expected.to_not contain_murano_cfapi_config('database/max_retries') }
|
||||||
it { is_expected.to_not contain_murano_cfapi_config('database/retry_interval') }
|
it { is_expected.to_not contain_murano_cfapi_config('database/retry_interval') }
|
||||||
it { is_expected.to_not contain_murano_cfapi_config('database/max_pool_size') }
|
it { is_expected.to_not contain_murano_cfapi_config('database/max_pool_size') }
|
||||||
|
@ -19,7 +18,6 @@ describe 'murano::db_cfapi' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :database_connection => 'mysql+pymysql://murano_cfapi:murano_cfapi@localhost/murano_cfapi',
|
{ :database_connection => 'mysql+pymysql://murano_cfapi:murano_cfapi@localhost/murano_cfapi',
|
||||||
:database_idle_timeout => '3601',
|
:database_idle_timeout => '3601',
|
||||||
:database_min_pool_size => '2',
|
|
||||||
:database_max_retries => '11',
|
:database_max_retries => '11',
|
||||||
:database_retry_interval => '11',
|
:database_retry_interval => '11',
|
||||||
:database_max_pool_size => '11',
|
:database_max_pool_size => '11',
|
||||||
|
@ -31,7 +29,6 @@ describe 'murano::db_cfapi' do
|
||||||
it { should contain_oslo__db('murano_cfapi_config').with(
|
it { should contain_oslo__db('murano_cfapi_config').with(
|
||||||
:connection => 'mysql+pymysql://murano_cfapi:murano_cfapi@localhost/murano_cfapi',
|
:connection => 'mysql+pymysql://murano_cfapi:murano_cfapi@localhost/murano_cfapi',
|
||||||
:idle_timeout => '3601',
|
:idle_timeout => '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',
|
||||||
|
|
|
@ -7,7 +7,6 @@ describe 'murano::db' do
|
||||||
:db_max_retries => '<SERVICE DEFAULT>',
|
:db_max_retries => '<SERVICE DEFAULT>',
|
||||||
:connection => 'mysql+pymysql://murano:secrete@localhost:3306/murano',
|
:connection => 'mysql+pymysql://murano:secrete@localhost:3306/murano',
|
||||||
: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>',
|
||||||
|
@ -21,7 +20,6 @@ describe 'murano::db' do
|
||||||
{
|
{
|
||||||
:database_connection => 'mysql+pymysql://murano:murano@localhost/murano',
|
:database_connection => 'mysql+pymysql://murano:murano@localhost/murano',
|
||||||
:database_connection_recycle_time => '3601',
|
:database_connection_recycle_time => '3601',
|
||||||
:database_min_pool_size => '2',
|
|
||||||
:database_max_retries => '11',
|
:database_max_retries => '11',
|
||||||
:database_retry_interval => '11',
|
:database_retry_interval => '11',
|
||||||
:database_max_pool_size => '11',
|
:database_max_pool_size => '11',
|
||||||
|
@ -35,7 +33,6 @@ describe 'murano::db' do
|
||||||
:db_max_retries => '-1',
|
:db_max_retries => '-1',
|
||||||
:connection => 'mysql+pymysql://murano:murano@localhost/murano',
|
:connection => 'mysql+pymysql://murano:murano@localhost/murano',
|
||||||
: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