Deprecate min_pool_size option
min_pool_size option is not used,see: https://review.opendev.org/#/c/565090/ Change-Id: I643456548591f8dc6355fe90734ab35ba2de0706 Closes-Bug: #1868511
This commit is contained in:
parent
a76f3b21de
commit
7e24be3e85
|
@ -21,10 +21,6 @@
|
||||||
# Interval between retries of opening a sql connection.
|
# Interval between retries of opening a sql connection.
|
||||||
# (Optional) Defaults to $::os_service_default
|
# (Optional) Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*database_min_pool_size*]
|
|
||||||
# Minimum number of SQL connections to keep open in a pool.
|
|
||||||
# (Optional) Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*database_max_pool_size*]
|
# [*database_max_pool_size*]
|
||||||
# Maximum number of SQL connections to keep open in a pool.
|
# Maximum number of SQL connections to keep open in a pool.
|
||||||
# (Optional) Defaults to $::os_service_default
|
# (Optional) Defaults to $::os_service_default
|
||||||
|
@ -42,20 +38,31 @@
|
||||||
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*database_min_pool_size*]
|
||||||
|
# Minimum number of SQL connections to keep open in a pool.
|
||||||
|
# (Optional) Defaults to undef
|
||||||
|
#
|
||||||
class ironic::db (
|
class ironic::db (
|
||||||
$database_connection = 'sqlite:////var/lib/ironic/ovs.sqlite',
|
$database_connection = 'sqlite:////var/lib/ironic/ovs.sqlite',
|
||||||
$database_connection_recycle_time = $::os_service_default,
|
$database_connection_recycle_time = $::os_service_default,
|
||||||
$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_min_pool_size = $::os_service_default,
|
|
||||||
$database_max_pool_size = $::os_service_default,
|
$database_max_pool_size = $::os_service_default,
|
||||||
$database_max_overflow = $::os_service_default,
|
$database_max_overflow = $::os_service_default,
|
||||||
$database_db_max_retries = $::os_service_default,
|
$database_db_max_retries = $::os_service_default,
|
||||||
$database_pool_timeout = $::os_service_default,
|
$database_pool_timeout = $::os_service_default,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$database_min_pool_size = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ironic::deps
|
include ironic::deps
|
||||||
|
|
||||||
|
if $::ironic::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.')
|
||||||
|
}
|
||||||
|
|
||||||
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
|
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
|
||||||
# to use ironic::<myparam> if ironic::db::<myparam> isn't specified.
|
# to use ironic::<myparam> if ironic::db::<myparam> isn't specified.
|
||||||
$database_connection_real = pick($::ironic::database_connection, $database_connection)
|
$database_connection_real = pick($::ironic::database_connection, $database_connection)
|
||||||
|
@ -63,7 +70,6 @@ class ironic::db (
|
||||||
$database_connection_recycle_time)
|
$database_connection_recycle_time)
|
||||||
$database_max_retries_real = pick($::ironic::database_max_retries, $database_max_retries)
|
$database_max_retries_real = pick($::ironic::database_max_retries, $database_max_retries)
|
||||||
$database_retry_interval_real = pick($::ironic::database_retry_interval, $database_retry_interval)
|
$database_retry_interval_real = pick($::ironic::database_retry_interval, $database_retry_interval)
|
||||||
$database_min_pool_size_real = pick($::ironic::database_min_pool_size, $database_min_pool_size)
|
|
||||||
$database_max_pool_size_real = pick($::ironic::database_max_pool_size, $database_max_pool_size)
|
$database_max_pool_size_real = pick($::ironic::database_max_pool_size, $database_max_pool_size)
|
||||||
$database_max_overflow_real = pick($::ironic::database_max_overflow, $database_max_overflow)
|
$database_max_overflow_real = pick($::ironic::database_max_overflow, $database_max_overflow)
|
||||||
|
|
||||||
|
@ -73,7 +79,6 @@ class ironic::db (
|
||||||
oslo::db { 'ironic_config':
|
oslo::db { 'ironic_config':
|
||||||
connection => $database_connection_real,
|
connection => $database_connection_real,
|
||||||
connection_recycle_time => $database_connection_recycle_time_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_pool_size => $database_max_pool_size_real,
|
||||||
max_retries => $database_max_retries_real,
|
max_retries => $database_max_retries_real,
|
||||||
retry_interval => $database_retry_interval_real,
|
retry_interval => $database_retry_interval_real,
|
||||||
|
|
|
@ -224,10 +224,6 @@
|
||||||
# (optional) Database reconnection interval in seconds.
|
# (optional) Database reconnection interval in seconds.
|
||||||
# Defaults to: undef
|
# 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*]
|
# [*database_max_pool_size*]
|
||||||
# (optional) Maximum number of SQL connections to keep open in a pool.
|
# (optional) Maximum number of SQL connections to keep open in a pool.
|
||||||
# Defaults to: undef
|
# Defaults to: undef
|
||||||
|
@ -272,6 +268,12 @@
|
||||||
# (optional) Topics for the versioned notifications issued by Ironic
|
# (optional) Topics for the versioned notifications issued by Ironic
|
||||||
# Defaults to $::os_service_default
|
# 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 ironic (
|
class ironic (
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
|
@ -317,7 +319,6 @@ class ironic (
|
||||||
$database_idle_timeout = undef,
|
$database_idle_timeout = undef,
|
||||||
$database_reconnect_interval = undef,
|
$database_reconnect_interval = undef,
|
||||||
$database_retry_interval = undef,
|
$database_retry_interval = undef,
|
||||||
$database_min_pool_size = undef,
|
|
||||||
$database_max_pool_size = undef,
|
$database_max_pool_size = undef,
|
||||||
$database_max_overflow = undef,
|
$database_max_overflow = undef,
|
||||||
$sync_db = true,
|
$sync_db = true,
|
||||||
|
@ -328,6 +329,8 @@ class ironic (
|
||||||
$notification_topics = $::os_service_default,
|
$notification_topics = $::os_service_default,
|
||||||
$notification_level = $::os_service_default,
|
$notification_level = $::os_service_default,
|
||||||
$versioned_notifications_topics = $::os_service_default,
|
$versioned_notifications_topics = $::os_service_default,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$database_min_pool_size = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ironic::deps
|
include ironic::deps
|
||||||
|
|
|
@ -26,10 +26,6 @@
|
||||||
# Interval between retries of opening a sql connection.
|
# Interval between retries of opening a sql connection.
|
||||||
# (Optional) Defaults to $::os_service_default
|
# (Optional) Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*database_min_pool_size*]
|
|
||||||
# Minimum number of SQL connections to keep open in a pool.
|
|
||||||
# (Optional) Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*database_max_pool_size*]
|
# [*database_max_pool_size*]
|
||||||
# Maximum number of SQL connections to keep open in a pool.
|
# Maximum number of SQL connections to keep open in a pool.
|
||||||
# (Optional) Defaults to $::os_service_default
|
# (Optional) Defaults to $::os_service_default
|
||||||
|
@ -42,20 +38,31 @@
|
||||||
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*database_min_pool_size*]
|
||||||
|
# Minimum number of SQL connections to keep open in a pool.
|
||||||
|
# (Optional) Defaults to undef
|
||||||
|
#
|
||||||
class ironic::inspector::db (
|
class ironic::inspector::db (
|
||||||
$database_connection = 'sqlite:////var/lib/ironic-inspector/inspector.sqlite',
|
$database_connection = 'sqlite:////var/lib/ironic-inspector/inspector.sqlite',
|
||||||
$database_connection_recycle_time = $::os_service_default,
|
$database_connection_recycle_time = $::os_service_default,
|
||||||
$database_max_retries = $::os_service_default,
|
$database_max_retries = $::os_service_default,
|
||||||
$database_db_max_retries = $::os_service_default,
|
$database_db_max_retries = $::os_service_default,
|
||||||
$database_retry_interval = $::os_service_default,
|
$database_retry_interval = $::os_service_default,
|
||||||
$database_min_pool_size = $::os_service_default,
|
|
||||||
$database_max_pool_size = $::os_service_default,
|
$database_max_pool_size = $::os_service_default,
|
||||||
$database_max_overflow = $::os_service_default,
|
$database_max_overflow = $::os_service_default,
|
||||||
$database_pool_timeout = $::os_service_default,
|
$database_pool_timeout = $::os_service_default,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$database_min_pool_size = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ironic::params
|
include ironic::params
|
||||||
|
|
||||||
|
if $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($::ironic::inspector::db_connection, $database_connection)
|
$database_connection_real = pick($::ironic::inspector::db_connection, $database_connection)
|
||||||
|
|
||||||
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection_real,
|
validate_legacy(Oslo::Dbconn, 'validate_re', $database_connection_real,
|
||||||
|
@ -64,7 +71,6 @@ class ironic::inspector::db (
|
||||||
oslo::db { 'ironic_inspector_config':
|
oslo::db { 'ironic_inspector_config':
|
||||||
connection => $database_connection_real,
|
connection => $database_connection_real,
|
||||||
connection_recycle_time => $database_connection_recycle_time,
|
connection_recycle_time => $database_connection_recycle_time,
|
||||||
min_pool_size => $database_min_pool_size,
|
|
||||||
max_pool_size => $database_max_pool_size,
|
max_pool_size => $database_max_pool_size,
|
||||||
max_retries => $database_max_retries,
|
max_retries => $database_max_retries,
|
||||||
db_max_retries => $database_max_retries,
|
db_max_retries => $database_max_retries,
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- database_min_pool_size option is now deprecated for removal, the
|
||||||
|
parameter has no effect.
|
|
@ -9,7 +9,6 @@ describe 'ironic::db' do
|
||||||
:db_max_retries => '<SERVICE DEFAULT>',
|
:db_max_retries => '<SERVICE DEFAULT>',
|
||||||
:connection => 'sqlite:////var/lib/ironic/ovs.sqlite',
|
:connection => 'sqlite:////var/lib/ironic/ovs.sqlite',
|
||||||
:connection_recycle_time => '<SERVICE DEFAULT>',
|
:connection_recycle_time => '<SERVICE DEFAULT>',
|
||||||
:min_pool_size => '<SERVICE DEFAULT>',
|
|
||||||
:max_pool_size => '<SERVICE DEFAULT>',
|
:max_pool_size => '<SERVICE DEFAULT>',
|
||||||
:max_retries => '<SERVICE DEFAULT>',
|
:max_retries => '<SERVICE DEFAULT>',
|
||||||
:pool_timeout => '<SERVICE DEFAULT>',
|
:pool_timeout => '<SERVICE DEFAULT>',
|
||||||
|
@ -23,7 +22,6 @@ describe 'ironic::db' do
|
||||||
{
|
{
|
||||||
:database_connection => 'mysql+pymysql://ironic:ironic@localhost/ironic',
|
:database_connection => 'mysql+pymysql://ironic:ironic@localhost/ironic',
|
||||||
:database_connection_recycle_time => '3601',
|
:database_connection_recycle_time => '3601',
|
||||||
:database_min_pool_size => '2',
|
|
||||||
:database_max_pool_size => '21',
|
:database_max_pool_size => '21',
|
||||||
:database_max_retries => '11',
|
:database_max_retries => '11',
|
||||||
:database_pool_timeout => '21',
|
:database_pool_timeout => '21',
|
||||||
|
@ -39,7 +37,6 @@ describe 'ironic::db' do
|
||||||
:db_max_retries => '-1',
|
:db_max_retries => '-1',
|
||||||
:connection => 'mysql+pymysql://ironic:ironic@localhost/ironic',
|
:connection => 'mysql+pymysql://ironic:ironic@localhost/ironic',
|
||||||
:connection_recycle_time => '3601',
|
:connection_recycle_time => '3601',
|
||||||
:min_pool_size => '2',
|
|
||||||
:max_pool_size => '21',
|
:max_pool_size => '21',
|
||||||
:max_retries => '11',
|
:max_retries => '11',
|
||||||
:retry_interval => '11',
|
:retry_interval => '11',
|
||||||
|
|
|
@ -8,7 +8,6 @@ describe 'ironic::inspector::db' do
|
||||||
it { should contain_oslo__db('ironic_inspector_config').with(
|
it { should contain_oslo__db('ironic_inspector_config').with(
|
||||||
:connection => 'sqlite:////var/lib/ironic-inspector/inspector.sqlite',
|
:connection => 'sqlite:////var/lib/ironic-inspector/inspector.sqlite',
|
||||||
:connection_recycle_time => '<SERVICE DEFAULT>',
|
:connection_recycle_time => '<SERVICE DEFAULT>',
|
||||||
:min_pool_size => '<SERVICE DEFAULT>',
|
|
||||||
:max_pool_size => '<SERVICE DEFAULT>',
|
:max_pool_size => '<SERVICE DEFAULT>',
|
||||||
:max_retries => '<SERVICE DEFAULT>',
|
:max_retries => '<SERVICE DEFAULT>',
|
||||||
:db_max_retries => '<SERVICE DEFAULT>',
|
:db_max_retries => '<SERVICE DEFAULT>',
|
||||||
|
@ -23,7 +22,6 @@ describe 'ironic::inspector::db' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :database_connection => 'mysql+pymysql://ironic:ironic@localhost/ironic',
|
{ :database_connection => 'mysql+pymysql://ironic:ironic@localhost/ironic',
|
||||||
:database_connection_recycle_time => '3601',
|
:database_connection_recycle_time => '3601',
|
||||||
:database_min_pool_size => '2',
|
|
||||||
:database_max_pool_size => '21',
|
:database_max_pool_size => '21',
|
||||||
:database_max_retries => '11',
|
:database_max_retries => '11',
|
||||||
:database_db_max_retries => '11',
|
:database_db_max_retries => '11',
|
||||||
|
@ -35,7 +33,6 @@ describe 'ironic::inspector::db' do
|
||||||
it { should contain_oslo__db('ironic_inspector_config').with(
|
it { should contain_oslo__db('ironic_inspector_config').with(
|
||||||
:connection => 'mysql+pymysql://ironic:ironic@localhost/ironic',
|
:connection => 'mysql+pymysql://ironic:ironic@localhost/ironic',
|
||||||
:connection_recycle_time => '3601',
|
:connection_recycle_time => '3601',
|
||||||
:min_pool_size => '2',
|
|
||||||
:max_pool_size => '21',
|
:max_pool_size => '21',
|
||||||
:max_retries => '11',
|
:max_retries => '11',
|
||||||
:db_max_retries => '11',
|
:db_max_retries => '11',
|
||||||
|
|
Loading…
Reference in New Issue