Deprecate remaining [database] idle_timeout
... because support by puppet-oslo was deprecated several cycles ago by [1] and the parameter has had no effect since then. [1] 3eb0e709473d53bc9a26c672c10486828d84d50f Change-Id: I0fa2d0f171113a0cd176138eec8ecffaa584f776
This commit is contained in:
parent
0047d3eba8
commit
bfe5a82b50
|
@ -13,7 +13,7 @@
|
|||
# Set to -1 to specify an infinite retry count.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*database_idle_timeout*]
|
||||
# [*database_connection_recycle_time*]
|
||||
# (Optional) Timeout before idle SQL connections are reaped.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
|
@ -34,28 +34,39 @@
|
|||
# before error is raised. Set to -1 to specify an infinite retry count.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*database_idle_timeout*]
|
||||
# (Optional) Timeout before idle SQL connections are reaped.
|
||||
# Defaults to undef
|
||||
#
|
||||
class murano::db_cfapi (
|
||||
$database_connection = $::os_service_default,
|
||||
$database_idle_timeout = $::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_db_max_retries = $::os_service_default,
|
||||
$database_connection = $::os_service_default,
|
||||
$database_connection_recycle_time = $::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_db_max_retries = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$database_idle_timeout = undef,
|
||||
) {
|
||||
|
||||
include murano::deps
|
||||
|
||||
if !is_service_default($database_connection) {
|
||||
if $database_idle_timeout != undef {
|
||||
warning('The database_idle_timeout parameter is deprecated and has no effect.')
|
||||
}
|
||||
|
||||
if !is_service_default($database_connection) {
|
||||
oslo::db { 'murano_cfapi_config':
|
||||
connection => $database_connection,
|
||||
idle_timeout => $database_idle_timeout,
|
||||
max_pool_size => $database_max_pool_size,
|
||||
max_retries => $database_max_retries,
|
||||
retry_interval => $database_retry_interval,
|
||||
max_overflow => $database_max_overflow,
|
||||
db_max_retries => $database_db_max_retries,
|
||||
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,
|
||||
db_max_retries => $database_db_max_retries,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The new ``murano::db_cfapi::connection_recycle_time`` parameter has been
|
||||
added.
|
||||
|
||||
deprecations:
|
||||
- |
|
||||
The ``murano::db_cfapi::database_idle_timeout`` parameter has been
|
||||
deprecated. The parameter has had no effect since the same parameter
|
||||
in puppet-oslo was deprecated.
|
|
@ -10,24 +10,24 @@ describe 'murano::db_cfapi' do
|
|||
|
||||
context 'with specific parameters' do
|
||||
let :params do
|
||||
{ :database_connection => 'mysql+pymysql://murano_cfapi:murano_cfapi@localhost/murano_cfapi',
|
||||
:database_idle_timeout => '3601',
|
||||
:database_max_retries => '11',
|
||||
:database_retry_interval => '11',
|
||||
:database_max_pool_size => '11',
|
||||
:database_max_overflow => '21',
|
||||
:database_db_max_retries => '-1',
|
||||
{ :database_connection => 'mysql+pymysql://murano_cfapi:murano_cfapi@localhost/murano_cfapi',
|
||||
:database_connection_recycle_time => '3601',
|
||||
:database_max_retries => '11',
|
||||
:database_retry_interval => '11',
|
||||
:database_max_pool_size => '11',
|
||||
:database_max_overflow => '21',
|
||||
:database_db_max_retries => '-1',
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_oslo__db('murano_cfapi_config').with(
|
||||
:connection => 'mysql+pymysql://murano_cfapi:murano_cfapi@localhost/murano_cfapi',
|
||||
:idle_timeout => '3601',
|
||||
:max_pool_size => '11',
|
||||
:max_retries => '11',
|
||||
:retry_interval => '11',
|
||||
:max_overflow => '21',
|
||||
:db_max_retries => '-1',
|
||||
:connection => 'mysql+pymysql://murano_cfapi:murano_cfapi@localhost/murano_cfapi',
|
||||
:connection_recycle_time => '3601',
|
||||
:max_pool_size => '11',
|
||||
:max_retries => '11',
|
||||
:retry_interval => '11',
|
||||
:max_overflow => '21',
|
||||
:db_max_retries => '-1',
|
||||
)}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue