diff --git a/manifests/db.pp b/manifests/db.pp index 917180a7..3737cb76 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -43,12 +43,6 @@ # Cluster (NDB). # 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 ( $database_connection = 'sqlite:////var/lib/ironic/ovs.sqlite', $database_connection_recycle_time = $::os_service_default, @@ -59,33 +53,17 @@ class ironic::db ( $database_db_max_retries = $::os_service_default, $database_pool_timeout = $::os_service_default, $mysql_enable_ndb = $::os_service_default, - # DEPRECATED PARAMETERS - $database_min_pool_size = undef, ) { 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 - # to use ironic:: if ironic::db:: isn't specified. - $database_connection_real = pick($::ironic::database_connection, $database_connection) - $database_connection_recycle_time_real = pick($::ironic::database_idle_timeout, - $database_connection_recycle_time) - $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_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) - oslo::db { 'ironic_config': - connection => $database_connection_real, - connection_recycle_time => $database_connection_recycle_time_real, - max_pool_size => $database_max_pool_size_real, - max_retries => $database_max_retries_real, - retry_interval => $database_retry_interval_real, - max_overflow => $database_max_overflow_real, + connection => $database_connection, + connection_recycle_time => $database_connection_recycle_time, + max_pool_size => $database_max_pool_size, + max_retries => $database_max_retries, + retry_interval => $database_retry_interval, + max_overflow => $database_max_overflow, db_max_retries => $database_db_max_retries, pool_timeout => $database_pool_timeout, mysql_enable_ndb => $mysql_enable_ndb, diff --git a/manifests/init.pp b/manifests/init.pp index 1f2abfa7..0d5c234d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -242,38 +242,6 @@ # # DEPRECATED PARAMETERS # -# [*database_min_pool_size*] -# (optional) Minimum number of SQL connections to keep open in a pool. -# Defaults to: undef -# -# [*database_connection*] -# (optional) Connection url for the ironic database. -# Defaults to: undef -# -# [*database_max_retries*] -# (optional) Database reconnection retry times. -# Defaults to: undef -# -# [*database_idle_timeout*] -# (optional) Timeout before idle db connections are reaped. -# Defaults to: undef -# -# [*database_reconnect_interval*] -# (optional) Database reconnection interval in seconds. -# Defaults to: undef -# -# [*database_retry_interval*] -# (optional) Database reconnection interval in seconds. -# Defaults to: undef -# -# [*database_max_pool_size*] -# (optional) Maximum number of SQL connections to keep open in a pool. -# Defaults to: undef -# -# [*database_max_overflow*] -# (optional) If set, use this value for max_overflow with sqlalchemy. -# Defaults to: undef -# # [*amqp_allow_insecure_clients*] # (Optional) Accept clients using either SSL or plain TCP # Defaults to undef. @@ -327,14 +295,6 @@ class ironic ( $notification_level = $::os_service_default, $versioned_notifications_topics = $::os_service_default, # DEPRECATED PARAMETERS - $database_min_pool_size = undef, - $database_connection = undef, - $database_max_retries = undef, - $database_idle_timeout = undef, - $database_reconnect_interval = undef, - $database_retry_interval = undef, - $database_max_pool_size = undef, - $database_max_overflow = undef, $amqp_allow_insecure_clients = undef, ) { @@ -347,42 +307,6 @@ class ironic ( will be removed in a future relese.') } - if $database_connection != undef { - warning('The database_connection parameter is deprecated and will be \ -removed in a future realse. Use ironic::db::database_connection instead') - } - - if $database_max_retries!= undef { - warning('The database_max_retries parameter is deprecated and will be \ -removed in a future realse. Use ironic::db::database_max_retries instead') - } - - if $database_idle_timeout != undef { - warning('The database_idle_timeout parameter is deprecated and will be \ -removed in a future realse. Use ironic::db::database_connection_recycle_time \ -instead') - } - - if $database_reconnect_interval != undef { - warning('The database_reconnect_interval parameter is deprecated \ -has no effect now.') - } - - if $database_retry_interval != undef { - warning('The database_retry_interval parameter is deprecated and will be \ -removed in a future realse. Use ironic::db::database_retry_interval instead') - } - - if $database_max_pool_size != undef { - warning('The database_max_pool_size parameter is deprecated and will be \ -removed in a future realse. Use ironic::db::database_max_pool_size instead') - } - - if $database_max_overflow != undef { - warning('The database_max_overflow parameter is deprecated and will be \ -removed in a future realse. Use ironic::db::database_max_overflow instead') - } - include ironic::glance include ironic::neutron diff --git a/releasenotes/notes/remove-database-params-1e660cd58eff4038.yaml b/releasenotes/notes/remove-database-params-1e660cd58eff4038.yaml new file mode 100644 index 00000000..0a97b501 --- /dev/null +++ b/releasenotes/notes/remove-database-params-1e660cd58eff4038.yaml @@ -0,0 +1,17 @@ +--- +upgrade: + - | + The following parameters of the ``ironic`` class has been removed. + + - ``database_min_pool_size`` + - ``database_connection`` + - ``database_max_retries`` + - ``database_idle_timeout`` + - ``database_reconnect_interval`` + - ``database_retry_interval`` + - ``database_max_pool_size`` + - ``database_max_overflow`` + + - | + The ``database_min_pool_size`` parameter of the ``ironic::db`` class has + been removed. diff --git a/spec/classes/ironic_init_spec.rb b/spec/classes/ironic_init_spec.rb index ab20109c..54b9f3cd 100644 --- a/spec/classes/ironic_init_spec.rb +++ b/spec/classes/ironic_init_spec.rb @@ -24,11 +24,6 @@ describe 'ironic' do let :params do { :package_ensure => 'present', - :database_connection => 'sqlite:////var/lib/ironic/ironic.sqlite', - :database_max_retries => 10, - :database_idle_timeout => 3600, - :database_reconnect_interval => 10, - :database_retry_interval => 10, :purge_config => false, } end @@ -95,17 +90,6 @@ describe 'ironic' do ) end - it 'should perform default database configuration' do - # NOTE(tkajinam): This is actually implemented in ironic::db. Remove this - # when removing the deprecated database_* parameters. - is_expected.to contain_oslo__db('ironic_config').with( - :connection => params[:database_connection], - :max_retries => params[:database_max_retries], - :connection_recycle_time => params[:database_idle_timeout], - :retry_interval => params[:database_retry_interval] - ) - end - it 'configures ironic.conf' do is_expected.to contain_ironic_config('DEFAULT/auth_strategy').with_value('keystone') is_expected.to contain_ironic_config('DEFAULT/my_ip').with_value('')