Browse Source

Add pool_timeout option

Add pool_timeout option to configure this value for pool_timeout with
SQLAlchemy.

Change-Id: Id6e7a30c6a94d6bf10ed924003dcf672e331c647
Closes-Bug: #1757581
changes/10/555110/2
ZhongShengping 4 years ago
parent
commit
261f5649ae
  1. 6
      manifests/db.pp
  2. 5
      releasenotes/notes/add-pool_timeout-option-for-db-e14f111a41b4b3af.yaml
  3. 3
      spec/classes/aodh_db_spec.rb

6
manifests/db.pp

@ -38,6 +38,10 @@
# If set, use this value for max_overflow with sqlalchemy.
# (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 aodh::db (
$database_db_max_retries = $::os_service_default,
$database_connection = 'sqlite:////var/lib/aodh/aodh.sqlite',
@ -47,6 +51,7 @@ class aodh::db (
$database_max_retries = $::os_service_default,
$database_retry_interval = $::os_service_default,
$database_max_overflow = $::os_service_default,
$database_pool_timeout = $::os_service_default,
) {
include ::aodh::deps
@ -68,5 +73,6 @@ class aodh::db (
max_retries => $database_max_retries_real,
retry_interval => $database_retry_interval_real,
max_overflow => $database_max_overflow_real,
pool_timeout => $database_pool_timeout,
}
}

5
releasenotes/notes/add-pool_timeout-option-for-db-e14f111a41b4b3af.yaml

@ -0,0 +1,5 @@
---
features:
- |
Adds the pool_timeout option for configuring oslo.db. This will
configure this value for pool_timeout with SQLAlchemy.

3
spec/classes/aodh_db_spec.rb

@ -14,6 +14,7 @@ describe 'aodh::db' do
:max_retries => '<SERVICE DEFAULT>',
:retry_interval => '<SERVICE DEFAULT>',
:max_overflow => '<SERVICE DEFAULT>',
:pool_timeout => '<SERVICE DEFAULT>',
)}
end
@ -28,6 +29,7 @@ describe 'aodh::db' do
:database_max_retries => '11',
:database_retry_interval => '11',
:database_max_overflow => '21',
:database_pool_timeout => '21',
}
end
it { is_expected.to contain_oslo__db('aodh_config').with(
@ -39,6 +41,7 @@ describe 'aodh::db' do
:max_retries => '11',
:retry_interval => '11',
:max_overflow => '21',
:pool_timeout => '21',
)}
end

Loading…
Cancel
Save