Browse Source

Deprecate sqlite_db option

The configuration option ``sqlite_db`` is now deprecated and will be
removed in the future. Please use configuration option ``connection``
or ``slave_connection`` to connect to the database.

Change-Id: I637fff0deea04a1631f7c1eaa590999efa63a4c2
Closes-Bug: #1675252
changes/99/448899/2
ZhongShengping 5 years ago
parent
commit
a29a62a10e
  1. 20
      manifests/db.pp
  2. 7
      releasenotes/notes/deprecate_config_sqlite_db-1a239175d42378e3.yaml
  3. 1
      spec/defines/oslo_db_spec.rb

20
manifests/db.pp

@ -7,10 +7,6 @@
#
# === Parameters:
#
# [*sqlite_db*]
# (Optional) The file name to use with SQLite.
# Defaults to $::os_service_default
#
# [*sqlite_synchronous*]
# (Optional) If True, SQLite uses synchronous mode (boolean value).
# Defaults to $::os_service_default
@ -100,8 +96,13 @@
# (Optional) Enable the experimental use of thread pooling for all DB API calls (boolean value)
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*sqlite_db*]
# (Optional) The file name to use with SQLite.
# Defaults to undef
#
define oslo::db(
$sqlite_db = $::os_service_default,
$sqlite_synchronous = $::os_service_default,
$backend = $::os_service_default,
$backend_package_ensure = present,
@ -123,6 +124,8 @@ define oslo::db(
$db_max_retry_interval = $::os_service_default,
$db_max_retries = $::os_service_default,
$use_tpool = $::os_service_default,
# DEPRECATED PARAMETERS
$sqlite_db = undef,
){
include ::oslo::params
@ -166,8 +169,13 @@ define oslo::db(
}
}
if $sqlite_db {
warning("The sqlite_db parameter is now deprecated and will be removed in the \
future release. Please use configuration option connection or slave_connection \
to connect to the database.")
}
$database_options = {
'database/sqlite_db' => { value => $sqlite_db },
'database/sqlite_synchronous' => { value => $sqlite_synchronous },
'database/backend' => { value => $backend },
'database/connection' => { value => $connection, secret => true },

7
releasenotes/notes/deprecate_config_sqlite_db-1a239175d42378e3.yaml

@ -0,0 +1,7 @@
---
deprecations:
- |
The configuration option ``sqlite_db`` is now deprecated and
will be removed in the future. Please use configuration
option ``connection`` or ``slave_connection`` to connect to the database.

1
spec/defines/oslo_db_spec.rb

@ -8,7 +8,6 @@ describe 'oslo::db' do
context 'with default parameters' do
it 'configure oslo_db default params' do
is_expected.to contain_keystone_config('database/sqlite_db').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('database/sqlite_synchronous').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('database/backend').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('database/connection').with_value('<SERVICE DEFAULT>')

Loading…
Cancel
Save