Browse Source

Deprecate min_pool_size option

min_pool_size option is not used,see:

https://review.opendev.org/#/c/565090/

Change-Id: I792d9d13257e910d6285896e77af4b80c0425a2a
Closes-Bug: #1868511
tags/16.2.0
ZhongShengping 4 months ago
parent
commit
c73e14b5f8
5 changed files with 24 additions and 16 deletions
  1. +12
    -7
      manifests/db.pp
  2. +8
    -5
      manifests/init.pp
  3. +4
    -0
      releasenotes/notes/deprecate_database_min_pool_size-option-9dfa542ba4fb4200.yaml
  4. +0
    -3
      spec/classes/octavia_db_spec.rb
  5. +0
    -1
      spec/classes/octavia_init_spec.rb

+ 12
- 7
manifests/db.pp View File

@@ -21,10 +21,6 @@
# (Optional) Interval between retries of opening a database connection.
# Defaults to $::os_service_default
#
# [*database_min_pool_size*]
# (Optional) Minimum number of SQL connections to keep open in a pool.
# Defaults to $::os_service_default
#
# [*database_max_pool_size*]
# (Optional) Maximum number of SQL connections to keep open in a pool.
# Defaults to $::os_service_default
@@ -42,24 +38,34 @@
# before error is raised. Set to -1 to specify an infinite retry count.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*database_min_pool_size*]
# (Optional) Minimum number of SQL connections to keep open in a pool.
# Defaults to undef
#
class octavia::db (
$database_connection = 'sqlite:////var/lib/octavia/octavia.sqlite',
$database_connection_recycle_time = $::os_service_default,
$database_min_pool_size = $::os_service_default,
$database_max_pool_size = $::os_service_default,
$database_max_retries = $::os_service_default,
$database_retry_interval = $::os_service_default,
$database_max_overflow = $::os_service_default,
$database_pool_timeout = $::os_service_default,
$database_db_max_retries = $::os_service_default,
# DEPRECATED PARAMETERS
$database_min_pool_size = undef,
) {

include octavia::deps

if $::octavia::database_min_pool_size or $database_min_pool_size {
warning('The database_min_pool_size parameter is deprecated, and will be removed in a future release.')
}

$database_connection_real = pick($::octavia::database_connection, $database_connection)
$database_connection_recycle_time_real = pick($::octavia::database_idle_timeout,
$database_connection_recycle_time)
$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)
@@ -73,7 +79,6 @@ class octavia::db (
oslo::db { 'octavia_config':
connection => $database_connection_real,
connection_recycle_time => $database_connection_recycle_time_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,


+ 8
- 5
manifests/init.pp View File

@@ -201,10 +201,6 @@
# (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.
@@ -222,6 +218,12 @@
# before error is raised. Set to -1 to specify an infinite retry count.
# Defaults to undef.
#
# DEPRECATED PARAMETERS
#
# [*database_min_pool_size*]
# (Optional) Minimum number of SQL connections to keep open in a pool.
# Defaults to undef.
#
class octavia (
$package_ensure = 'present',
$default_transport_url = $::os_service_default,
@@ -263,13 +265,14 @@ class octavia (
$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_pool_timeout = undef,
$database_db_max_retries = undef,
# DEPRECATED PARAMETERS
$database_min_pool_size = undef,
) inherits octavia::params {

include octavia::deps


+ 4
- 0
releasenotes/notes/deprecate_database_min_pool_size-option-9dfa542ba4fb4200.yaml View File

@@ -0,0 +1,4 @@
---
deprecations:
- database_min_pool_size option is now deprecated for removal, the
parameter has no effect.

+ 0
- 3
spec/classes/octavia_db_spec.rb View File

@@ -7,7 +7,6 @@ describe 'octavia::db' do
:db_max_retries => '<SERVICE DEFAULT>',
:connection => 'sqlite:////var/lib/octavia/octavia.sqlite',
:connection_recycle_time => '<SERVICE DEFAULT>',
:min_pool_size => '<SERVICE DEFAULT>',
:max_pool_size => '<SERVICE DEFAULT>',
:max_retries => '<SERVICE DEFAULT>',
:retry_interval => '<SERVICE DEFAULT>',
@@ -21,7 +20,6 @@ describe 'octavia::db' do
{
:database_connection => 'mysql+pymysql://octavia:octavia@localhost/octavia',
:database_connection_recycle_time => '3601',
:database_min_pool_size => '2',
:database_max_retries => '11',
:database_retry_interval => '11',
:database_max_pool_size => '11',
@@ -35,7 +33,6 @@ describe 'octavia::db' do
:db_max_retries => '-1',
:connection => 'mysql+pymysql://octavia:octavia@localhost/octavia',
:connection_recycle_time => '3601',
:min_pool_size => '2',
:max_pool_size => '11',
:max_retries => '11',
:retry_interval => '11',


+ 0
- 1
spec/classes/octavia_init_spec.rb View File

@@ -99,7 +99,6 @@ describe 'octavia' do
: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>',


Loading…
Cancel
Save