Browse Source

Add pool_timeout option

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

Change-Id: Ib84d68f367c043b40f15ec50d45093467f11a4f4
Closes-Bug: #1757581
changes/33/555133/1
ZhongShengping 4 years ago
parent
commit
03db4e5145
  1. 6
      manifests/db.pp
  2. 5
      releasenotes/notes/add-pool_timeout-option-for-db-b8801b27b2caa1c9.yaml
  3. 3
      spec/classes/ceilometer_db_spec.rb

6
manifests/db.pp

@ -44,6 +44,10 @@
# (Optional) enable database schema installation.
# Defaults to true.
#
# [*database_pool_timeout*]
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
# Defaults to $::os_service_default
#
class ceilometer::db (
$database_db_max_retries = $::os_service_default,
$database_connection = 'mysql+pymysql://ceilometer:ceilometer@localhost/ceilometer',
@ -53,6 +57,7 @@ class ceilometer::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,
$sync_db = true,
) {
@ -67,6 +72,7 @@ class ceilometer::db (
retry_interval => $database_retry_interval,
max_pool_size => $database_max_pool_size,
max_overflow => $database_max_overflow,
pool_timeout => $database_pool_timeout,
}
if $sync_db {

5
releasenotes/notes/add-pool_timeout-option-for-db-b8801b27b2caa1c9.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/ceilometer_db_spec.rb

@ -17,6 +17,7 @@ describe 'ceilometer::db' do
:max_retries => '<SERVICE DEFAULT>',
:retry_interval => '<SERVICE DEFAULT>',
:max_overflow => '<SERVICE DEFAULT>',
:pool_timeout => '<SERVICE DEFAULT>',
)}
end
@ -32,6 +33,7 @@ describe 'ceilometer::db' do
:database_max_retries => '11',
:database_retry_interval => '11',
:database_max_overflow => '21',
:database_pool_timeout => '21',
:sync_db => false }
end
@ -45,6 +47,7 @@ describe 'ceilometer::db' do
:max_retries => '11',
:retry_interval => '11',
:max_overflow => '21',
:pool_timeout => '21',
)}
end

Loading…
Cancel
Save