Revert "Added missing DB params to init class"
This reverts commit d15ef3eb9c
.
Change-Id: I8076d93e05ace936cfd6600d7d11c1af8db1c9dc
This commit is contained in:
parent
d15ef3eb9c
commit
8598f8024e
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# [*database_connection*]
|
||||
# (Optional) Url used to connect to database.
|
||||
# Defaults to 'sqlite:////var/lib/octavia/octavia.sqlite'.
|
||||
# Defaults to "sqlite:////var/lib/octavia/octavia.sqlite".
|
||||
#
|
||||
# [*database_idle_timeout*]
|
||||
# (Optional) Timeout when db connections should be reaped.
|
||||
|
@ -51,28 +51,18 @@ class octavia::db (
|
|||
|
||||
include ::octavia::deps
|
||||
|
||||
$database_connection_real = pick($::octavia::database_connection, $database_connection)
|
||||
$database_idle_timeout_real = pick($::octavia::database_idle_timeout, $database_idle_timeout)
|
||||
$database_min_pool_size_real = pick($::octavia::database_min_pool_size, $database_min_pool_size)
|
||||
$database_max_pool_size_real = pick($::octavia::database_max_pool_size, $database_max_pool_size)
|
||||
$database_max_retries_real = pick($::octavia::database_max_retries, $database_max_retries)
|
||||
$database_retry_interval_real = pick($::octavia::database_retry_interval, $database_retry_interval)
|
||||
$database_max_overflow_real = pick($::octavia::database_max_overflow, $database_max_overflow)
|
||||
$database_db_max_retries_real = pick($::octavia::database_db_max_retries, $database_db_max_retries)
|
||||
|
||||
|
||||
validate_re($database_connection_real,
|
||||
validate_re($database_connection,
|
||||
'^(sqlite|mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?')
|
||||
|
||||
oslo::db { 'octavia_config':
|
||||
connection => $database_connection_real,
|
||||
idle_timeout => $database_idle_timeout_real,
|
||||
min_pool_size => $database_min_pool_size_real,
|
||||
max_pool_size => $database_max_pool_size_real,
|
||||
max_retries => $database_max_retries_real,
|
||||
retry_interval => $database_retry_interval_real,
|
||||
max_overflow => $database_max_overflow_real,
|
||||
db_max_retries => $database_db_max_retries_real,
|
||||
connection => $database_connection,
|
||||
idle_timeout => $database_idle_timeout,
|
||||
min_pool_size => $database_min_pool_size,
|
||||
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,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -174,40 +174,6 @@
|
|||
# in the octavia config.
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*database_connection*]
|
||||
# (Optional) Url used to connect to database.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*database_idle_timeout*]
|
||||
# (Optional) Timeout when db connections should be reaped.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*database_max_retries*]
|
||||
# (Optional) Maximum number of database connection retries during startup.
|
||||
# Setting -1 implies an infinite retry count.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*database_retry_interval*]
|
||||
# (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.
|
||||
#
|
||||
# [*database_max_overflow*]
|
||||
# (Optional) If set, use this value for max_overflow with sqlalchemy.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*database_db_max_retries*]
|
||||
# (Optional) Maximum retries in case of connection error or deadlock error
|
||||
# before error is raised. Set to -1 to specify an infinite retry count.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*ensure_package*]
|
||||
|
@ -259,21 +225,12 @@ class octavia (
|
|||
$notification_topics = $::os_service_default,
|
||||
$topic = 'octavia-rpc',
|
||||
$purge_config = false,
|
||||
$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,
|
||||
$database_max_overflow = undef,
|
||||
$database_db_max_retries = undef,
|
||||
# DEPRECATED PARAMETERS
|
||||
$ensure_package = undef,
|
||||
$rpc_backend = 'rabbit',
|
||||
) inherits octavia::params {
|
||||
|
||||
include ::octavia::deps
|
||||
include ::octavia::db
|
||||
include ::octavia::logging
|
||||
|
||||
if $ensure_package {
|
||||
|
|
|
@ -94,21 +94,6 @@ describe 'octavia' do
|
|||
|
||||
end
|
||||
|
||||
context 'with default parameters' do
|
||||
it { is_expected.to contain_class('octavia::db') }
|
||||
it { is_expected.to contain_oslo__db('octavia_config').with(
|
||||
:db_max_retries => '<SERVICE DEFAULT>',
|
||||
:connection => 'sqlite:////var/lib/octavia/octavia.sqlite',
|
||||
:idle_timeout => '<SERVICE DEFAULT>',
|
||||
:min_pool_size => '<SERVICE DEFAULT>',
|
||||
:max_pool_size => '<SERVICE DEFAULT>',
|
||||
:max_retries => '<SERVICE DEFAULT>',
|
||||
:retry_interval => '<SERVICE DEFAULT>',
|
||||
:max_overflow => '<SERVICE DEFAULT>',
|
||||
:pool_timeout => '<SERVICE DEFAULT>',
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with kombu_reconnect_delay set to 5.0' do
|
||||
let :params do
|
||||
{ :kombu_reconnect_delay => '5.0' }
|
||||
|
|
Loading…
Reference in New Issue