Add support for db_max_retries param
The db_max_retries parameter regulates the number of reconnection attempts performed after an error raised rather than at startup. Change-Id: I91ee4d1fe255f0225b499ecf565bd91b89fc47bf Releated-Bug: #1579718
This commit is contained in:
parent
aca0919997
commit
39c790de6d
@ -12,6 +12,11 @@
|
||||
# Timeout when db connections should be reaped.
|
||||
# (Optional) Defaults to $::os_service_default
|
||||
#
|
||||
# [*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 $::os_service_default
|
||||
#
|
||||
# [*database_max_retries*]
|
||||
# Maximum db connection retries during startup.
|
||||
# Setting -1 implies an infinite retry count.
|
||||
@ -41,6 +46,7 @@ class ironic::inspector::db (
|
||||
$database_connection = 'sqlite:////var/lib/ironic-inspector/inspector.sqlite',
|
||||
$database_idle_timeout = $::os_service_default,
|
||||
$database_max_retries = $::os_service_default,
|
||||
$database_db_max_retries = $::os_service_default,
|
||||
$database_retry_interval = $::os_service_default,
|
||||
$database_min_pool_size = $::os_service_default,
|
||||
$database_max_pool_size = $::os_service_default,
|
||||
@ -61,6 +67,7 @@ class ironic::inspector::db (
|
||||
min_pool_size => $database_min_pool_size,
|
||||
max_pool_size => $database_max_pool_size,
|
||||
max_retries => $database_max_retries,
|
||||
db_max_retries => $database_max_retries,
|
||||
retry_interval => $database_retry_interval,
|
||||
max_overflow => $database_max_overflow,
|
||||
pool_timeout => $database_pool_timeout,
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- Add new option ironic::inspector::db::database_db_max_retries.
|
||||
The database_db_max_retries parameter regulates the number of
|
||||
reconnection attempts performed after an error raised rather
|
||||
than at startup.
|
@ -13,6 +13,7 @@ describe 'ironic::inspector::db' do
|
||||
it { is_expected.to contain_ironic_inspector_config('database/max_overflow').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_ironic_inspector_config('database/pool_timeout').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_ironic_inspector_config('database/max_retries').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_ironic_inspector_config('database/db_max_retries').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_ironic_inspector_config('database/retry_interval').with_value('<SERVICE DEFAULT>') }
|
||||
|
||||
end
|
||||
@ -24,6 +25,7 @@ describe 'ironic::inspector::db' do
|
||||
:database_min_pool_size => '2',
|
||||
:database_max_pool_size => '21',
|
||||
:database_max_retries => '11',
|
||||
:database_db_max_retries => '11',
|
||||
:database_max_overflow => '21',
|
||||
:database_pool_timeout => '21',
|
||||
:database_retry_interval => '11', }
|
||||
@ -33,6 +35,7 @@ describe 'ironic::inspector::db' do
|
||||
it { is_expected.to contain_ironic_inspector_config('database/idle_timeout').with_value('3601') }
|
||||
it { is_expected.to contain_ironic_inspector_config('database/min_pool_size').with_value('2') }
|
||||
it { is_expected.to contain_ironic_inspector_config('database/max_retries').with_value('11') }
|
||||
it { is_expected.to contain_ironic_inspector_config('database/db_max_retries').with_value('11') }
|
||||
it { is_expected.to contain_ironic_inspector_config('database/max_pool_size').with_value('21') }
|
||||
it { is_expected.to contain_ironic_inspector_config('database/max_overflow').with_value('21') }
|
||||
it { is_expected.to contain_ironic_inspector_config('database/pool_timeout').with_value('21') }
|
||||
|
Loading…
x
Reference in New Issue
Block a user