Merge "Add pool_timeout option"
This commit is contained in:
commit
e107f4291f
|
@ -75,6 +75,10 @@
|
||||||
# If set, use this value for max_overflow with sqlalchemy.
|
# If set, use this value for max_overflow with sqlalchemy.
|
||||||
# (Optional) Defaults to $::os_service_default
|
# (Optional) Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*database_pool_timeout*]
|
||||||
|
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
class nova::db (
|
class nova::db (
|
||||||
$database_db_max_retries = $::os_service_default,
|
$database_db_max_retries = $::os_service_default,
|
||||||
$database_connection = $::os_service_default,
|
$database_connection = $::os_service_default,
|
||||||
|
@ -89,6 +93,7 @@ class nova::db (
|
||||||
$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,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::deps
|
include ::nova::deps
|
||||||
|
@ -130,6 +135,7 @@ class nova::db (
|
||||||
max_retries => $database_max_retries_real,
|
max_retries => $database_max_retries_real,
|
||||||
retry_interval => $database_retry_interval_real,
|
retry_interval => $database_retry_interval_real,
|
||||||
max_overflow => $database_max_overflow_real,
|
max_overflow => $database_max_overflow_real,
|
||||||
|
pool_timeout => $database_pool_timeout,
|
||||||
slave_connection => $slave_connection_real,
|
slave_connection => $slave_connection_real,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Adds the pool_timeout option for configuring oslo.db. This will
|
||||||
|
configure this value for pool_timeout with SQLAlchemy.
|
|
@ -22,6 +22,7 @@ describe 'nova::db' do
|
||||||
it { is_expected.to_not contain_nova_config('database/max_retries') }
|
it { is_expected.to_not contain_nova_config('database/max_retries') }
|
||||||
it { is_expected.to_not contain_nova_config('database/retry_interval') }
|
it { is_expected.to_not contain_nova_config('database/retry_interval') }
|
||||||
it { is_expected.to_not contain_nova_config('database/max_overflow') }
|
it { is_expected.to_not contain_nova_config('database/max_overflow') }
|
||||||
|
it { is_expected.to_not contain_nova_config('database/pool_timeout') }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with overridden parameters' do
|
context 'with overridden parameters' do
|
||||||
|
@ -46,6 +47,7 @@ describe 'nova::db' do
|
||||||
:max_retries => '<SERVICE DEFAULT>',
|
:max_retries => '<SERVICE DEFAULT>',
|
||||||
:retry_interval => '<SERVICE DEFAULT>',
|
:retry_interval => '<SERVICE DEFAULT>',
|
||||||
:max_overflow => '<SERVICE DEFAULT>',
|
:max_overflow => '<SERVICE DEFAULT>',
|
||||||
|
:pool_timeout => '<SERVICE DEFAULT>',
|
||||||
)}
|
)}
|
||||||
it { is_expected.to contain_nova_config('api_database/connection').with_value('mysql+pymysql://user:pass@db/db2').with_secret(true) }
|
it { is_expected.to contain_nova_config('api_database/connection').with_value('mysql+pymysql://user:pass@db/db2').with_secret(true) }
|
||||||
it { is_expected.to contain_nova_config('api_database/slave_connection').with_value('mysql+pymysql://user:pass@slave/db2').with_secret(true) }
|
it { is_expected.to contain_nova_config('api_database/slave_connection').with_value('mysql+pymysql://user:pass@slave/db2').with_secret(true) }
|
||||||
|
|
Loading…
Reference in New Issue