Merge "Clean up deprecated database parameters"
This commit is contained in:
commit
3fd408af67
@ -97,12 +97,6 @@
|
|||||||
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
||||||
# 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 nova::db (
|
class nova::db (
|
||||||
$database_connection = $::os_service_default,
|
$database_connection = $::os_service_default,
|
||||||
$slave_connection = $::os_service_default,
|
$slave_connection = $::os_service_default,
|
||||||
@ -122,49 +116,31 @@ class nova::db (
|
|||||||
$api_database_retry_interval = $::os_service_default,
|
$api_database_retry_interval = $::os_service_default,
|
||||||
$api_database_max_overflow = $::os_service_default,
|
$api_database_max_overflow = $::os_service_default,
|
||||||
$api_database_pool_timeout = $::os_service_default,
|
$api_database_pool_timeout = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
$database_min_pool_size = undef,
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
|
|
||||||
if $::nova::database_min_pool_size or $database_min_pool_size {
|
if !is_service_default($database_connection) {
|
||||||
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)
|
|
||||||
$slave_connection_real = pick($::nova::slave_connection, $slave_connection)
|
|
||||||
$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_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)
|
|
||||||
$database_max_overflow_real = pick($::nova::database_max_overflow, $database_max_overflow)
|
|
||||||
|
|
||||||
if !is_service_default($database_connection_real) {
|
|
||||||
oslo::db { 'nova_config':
|
oslo::db { 'nova_config':
|
||||||
db_max_retries => $database_db_max_retries,
|
db_max_retries => $database_db_max_retries,
|
||||||
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,
|
||||||
slave_connection => $slave_connection_real,
|
slave_connection => $slave_connection,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !is_service_default($api_database_connection_real) {
|
if !is_service_default($api_database_connection) {
|
||||||
oslo::db { 'api_database':
|
oslo::db { 'api_database':
|
||||||
config => 'nova_config',
|
config => 'nova_config',
|
||||||
config_group => 'api_database',
|
config_group => 'api_database',
|
||||||
connection => $api_database_connection_real,
|
connection => $api_database_connection,
|
||||||
slave_connection => $api_slave_connection_real,
|
slave_connection => $api_slave_connection,
|
||||||
connection_recycle_time => $api_database_connection_recycle_time,
|
connection_recycle_time => $api_database_connection_recycle_time,
|
||||||
max_pool_size => $api_database_max_pool_size,
|
max_pool_size => $api_database_max_pool_size,
|
||||||
max_retries => $api_database_max_retries,
|
max_retries => $api_database_max_retries,
|
||||||
|
@ -370,10 +370,6 @@
|
|||||||
# (optional) The strategy to use for auth: noauth or keystone.
|
# (optional) The strategy to use for auth: noauth or keystone.
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# [*os_region_name*]
|
# [*os_region_name*]
|
||||||
# (optional) Sets the os_region_name flag. For environments with
|
# (optional) Sets the os_region_name flag. For environments with
|
||||||
# more than one endpoint per service, this is required to make
|
# more than one endpoint per service, this is required to make
|
||||||
@ -392,42 +388,6 @@
|
|||||||
# (optional) Sets a version cap for messages sent to console services
|
# (optional) Sets a version cap for messages sent to console services
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
# [*database_connection*]
|
|
||||||
# (optional) Connection url for the nova database.
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*slave_connection*]
|
|
||||||
# (optional) Connection url to connect to nova slave database (read-only).
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*api_database_connection*]
|
|
||||||
# (optional) Connection url for the nova API database.
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*api_slave_connection*]
|
|
||||||
# (optional) Connection url to connect to nova API slave database (read-only).
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*database_max_retries*]
|
|
||||||
# (optional) Maximum database connection retries during startup.
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*database_idle_timeout*]
|
|
||||||
# (optional) Timeout before idle database connections are reaped.
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*database_retry_interval*]
|
|
||||||
# (optional) Interval between retries of opening a database connection.
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*database_max_pool_size*]
|
|
||||||
# (optional) Maximum number of SQL connections to keep open in a pool.
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*database_max_overflow*]
|
|
||||||
# (optional) If set, use this value for max_overflow with sqlalchemy.
|
|
||||||
# Defaults to: undef.
|
|
||||||
#
|
|
||||||
# [*amqp_allow_insecure_clients*]
|
# [*amqp_allow_insecure_clients*]
|
||||||
# (Optional) Accept clients using either SSL or plain TCP
|
# (Optional) Accept clients using either SSL or plain TCP
|
||||||
# Defaults to undef.
|
# Defaults to undef.
|
||||||
@ -528,19 +488,9 @@ class nova(
|
|||||||
$dhcp_domain = $::os_service_default,
|
$dhcp_domain = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$auth_strategy = undef,
|
$auth_strategy = undef,
|
||||||
$database_min_pool_size = undef,
|
|
||||||
$os_region_name = undef,
|
$os_region_name = undef,
|
||||||
$cinder_catalog_info = undef,
|
$cinder_catalog_info = undef,
|
||||||
$upgrade_level_console = undef,
|
$upgrade_level_console = undef,
|
||||||
$database_connection = undef,
|
|
||||||
$slave_connection = undef,
|
|
||||||
$api_database_connection = undef,
|
|
||||||
$api_slave_connection = undef,
|
|
||||||
$database_idle_timeout = undef,
|
|
||||||
$database_max_pool_size = undef,
|
|
||||||
$database_max_retries = undef,
|
|
||||||
$database_retry_interval = undef,
|
|
||||||
$database_max_overflow = undef,
|
|
||||||
$amqp_allow_insecure_clients = undef,
|
$amqp_allow_insecure_clients = undef,
|
||||||
$glance_endpoint_override = undef,
|
$glance_endpoint_override = undef,
|
||||||
$glance_num_retries = undef,
|
$glance_num_retries = undef,
|
||||||
@ -576,52 +526,6 @@ in a future release. Use nova::cinder::catalog_info instead')
|
|||||||
no effect.')
|
no effect.')
|
||||||
}
|
}
|
||||||
|
|
||||||
if $database_connection != undef {
|
|
||||||
warning('The database_connection parameter is deprecated and will be \
|
|
||||||
removed in a future realse. Use nova::db::database_connection instead')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $slave_connection != undef {
|
|
||||||
warning('The slave_connection parameter is deprecated and will be \
|
|
||||||
removed in a future realse. Use nova::db::slave_connection instead')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $api_database_connection != undef {
|
|
||||||
warning('The api_database_connection parameter is deprecated and will be \
|
|
||||||
removed in a future realse. Use nova::db::api_database_connection instead')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $api_slave_connection != undef {
|
|
||||||
warning('The api_slave_connection parameter is deprecated and will be \
|
|
||||||
removed in a future realse. Use nova::db::api_slave_connection instead')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $database_idle_timeout != undef {
|
|
||||||
warning('The database_idle_timeout parameter is deprecated and will be \
|
|
||||||
removed in a future realse. Use nova::db::database_connection_recycle_time \
|
|
||||||
instead')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $database_max_pool_size != undef {
|
|
||||||
warning('The database_max_pool_size parameter is deprecated and will be \
|
|
||||||
removed in a future realse. Use nova::db::database_max_pool_size instead')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $database_max_retries!= undef {
|
|
||||||
warning('The database_max_retries parameter is deprecated and will be \
|
|
||||||
removed in a future realse. Use nova::db::database_max_retries instead')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $database_retry_interval != undef {
|
|
||||||
warning('The database_retry_interval parameter is deprecated and will be \
|
|
||||||
removed in a future realse. Use nova::db::database_retry_interval instead')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $database_max_overflow != undef {
|
|
||||||
warning('The database_max_overflow parameter is deprecated and will be \
|
|
||||||
removed in a future realse. Use nova::db::database_max_overflow instead')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $glance_endpoint_override != undef {
|
if $glance_endpoint_override != undef {
|
||||||
warning('The glance_endpoint_override parameter is deprecated. \
|
warning('The glance_endpoint_override parameter is deprecated. \
|
||||||
Use nova::glance::endpoint_override instead.')
|
Use nova::glance::endpoint_override instead.')
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The following parameters of the ``nova`` class have been removed.
|
||||||
|
|
||||||
|
- ``database_min_pool_size``
|
||||||
|
- ``database_connection``
|
||||||
|
- ``slave_connection``
|
||||||
|
- ``api_database_connection``
|
||||||
|
- ``api_slave_connection``
|
||||||
|
- ``database_idle_timeout``
|
||||||
|
- ``database_max_overflow``
|
||||||
|
- ``database_max_pool_size``
|
||||||
|
- ``database_max_retries``
|
||||||
|
- ``database_retry_interval``
|
||||||
|
|
||||||
|
- |
|
||||||
|
The ``database_min_pool_size`` parameter of the ``nova::db`` class has been
|
||||||
|
removed.
|
Loading…
Reference in New Issue
Block a user