Clean up deprecated database parameters
Change-Id: I074bdda1edca71b623852df25441fa255f2aa898
This commit is contained in:
@@ -43,12 +43,6 @@
|
|||||||
# 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*]
|
|
||||||
# Minimum number of SQL connections to keep open in a pool.
|
|
||||||
# (Optional) Defaults to undef
|
|
||||||
#
|
|
||||||
class mistral::db (
|
class mistral::db (
|
||||||
$database_connection = 'sqlite:////var/lib/mistral/mistral.sqlite',
|
$database_connection = 'sqlite:////var/lib/mistral/mistral.sqlite',
|
||||||
$database_connection_recycle_time = $::os_service_default,
|
$database_connection_recycle_time = $::os_service_default,
|
||||||
@@ -59,32 +53,17 @@ class mistral::db (
|
|||||||
$database_pool_timeout = $::os_service_default,
|
$database_pool_timeout = $::os_service_default,
|
||||||
$mysql_enable_ndb = $::os_service_default,
|
$mysql_enable_ndb = $::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 mistral::deps
|
include mistral::deps
|
||||||
|
|
||||||
if $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 mistral::<myparam> if mistral::db::<myparam> isn't specified.
|
|
||||||
$database_connection_real = pick($::mistral::database_connection,$database_connection)
|
|
||||||
$database_connection_recycle_time_real = pick($::mistral::database_idle_timeout, $database_connection_recycle_time)
|
|
||||||
$database_max_pool_size_real = pick($::mistral::database_max_pool_size,$database_max_pool_size)
|
|
||||||
$database_max_retries_real = pick($::mistral::database_max_retries,$database_max_retries)
|
|
||||||
$database_retry_interval_real = pick($::mistral::database_retry_interval,$database_retry_interval)
|
|
||||||
$database_max_overflow_real = pick($::mistral::database_max_overflow,$database_max_overflow)
|
|
||||||
|
|
||||||
oslo::db { 'mistral_config':
|
oslo::db { 'mistral_config':
|
||||||
connection => $database_connection_real,
|
connection => $database_connection,
|
||||||
connection_recycle_time => $database_connection_recycle_time_real,
|
connection_recycle_time => $database_connection_recycle_time,
|
||||||
max_pool_size => $database_max_pool_size_real,
|
max_pool_size => $database_max_pool_size,
|
||||||
max_retries => $database_max_retries_real,
|
max_retries => $database_max_retries,
|
||||||
retry_interval => $database_retry_interval_real,
|
retry_interval => $database_retry_interval,
|
||||||
max_overflow => $database_max_overflow_real,
|
max_overflow => $database_max_overflow,
|
||||||
pool_timeout => $database_pool_timeout,
|
pool_timeout => $database_pool_timeout,
|
||||||
mysql_enable_ndb => $mysql_enable_ndb,
|
mysql_enable_ndb => $mysql_enable_ndb,
|
||||||
db_max_retries => $database_db_max_retries,
|
db_max_retries => $database_db_max_retries,
|
||||||
|
@@ -154,10 +154,6 @@
|
|||||||
#
|
#
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
#
|
#
|
||||||
# [*database_connection*]
|
|
||||||
# (optional) Url used to connect to database.
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*coordination_backend_url*]
|
# [*coordination_backend_url*]
|
||||||
# (optional) The backend URL to be used for coordination.
|
# (optional) The backend URL to be used for coordination.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
@@ -195,7 +191,6 @@ class mistral(
|
|||||||
$check_interval = $::os_service_default,
|
$check_interval = $::os_service_default,
|
||||||
$first_heartbeat_timeout = $::os_service_default,
|
$first_heartbeat_timeout = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$database_connection = undef,
|
|
||||||
$coordination_backend_url = undef,
|
$coordination_backend_url = undef,
|
||||||
$coordination_heartbeat_interval = undef,
|
$coordination_heartbeat_interval = undef,
|
||||||
){
|
){
|
||||||
@@ -204,11 +199,6 @@ class mistral(
|
|||||||
include mistral::params
|
include mistral::params
|
||||||
include mistral::db
|
include mistral::db
|
||||||
|
|
||||||
if $database_connection != undef {
|
|
||||||
warning('The database_connection parameter is deprecated and will be \
|
|
||||||
removed in a future realse. Use mistral::db::database_connection instead')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $coordination_backend_url != undef or $coordination_heartbeat_interval != undef {
|
if $coordination_backend_url != undef or $coordination_heartbeat_interval != undef {
|
||||||
warning('The mistral::coordination_* parameters are deprecated. Use mistral::coordination instead')
|
warning('The mistral::coordination_* parameters are deprecated. Use mistral::coordination instead')
|
||||||
include mistral::coordination
|
include mistral::coordination
|
||||||
|
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The ``mistral::database_connection`` parameter has been removed.
|
||||||
|
|
||||||
|
- |
|
||||||
|
The ``mistral::db::database_min_pool_size`` parameter has been removed.
|
Reference in New Issue
Block a user