Add mysql_enable_ndb option

Add mysql_enable_ndb parameter to select mysql storage engine.

Change-Id: I28bc5b80058521c6918592fc7fa61f9cfdd4781c
Depends-On: https://review.opendev.org/#/c/748067
Closes-Bug: #1892952
This commit is contained in:
ZhongShengping 2020-08-26 11:53:17 +08:00
parent 257f929622
commit 3bca80b569
3 changed files with 14 additions and 0 deletions

View File

@ -47,6 +47,11 @@
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
# Defaults to $::os_service_default
#
# [*mysql_enable_ndb*]
# (Optional) If True, transparently enables support for handling MySQL
# Cluster (NDB).
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*database_min_pool_size*]
@ -64,6 +69,7 @@ class barbican::db (
$database_pool_size = $::os_service_default,
$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,
) {
@ -86,6 +92,7 @@ class barbican::db (
max_overflow => $database_max_overflow,
db_max_retries => $database_db_max_retries,
pool_timeout => $database_pool_timeout,
mysql_enable_ndb => $mysql_enable_ndb,
}
# TODO(aschultz): Remove this config once barbican properly leverages oslo

View File

@ -0,0 +1,4 @@
---
features:
- |
Add mysql_enable_ndb parameter to select mysql storage engine.

View File

@ -33,6 +33,7 @@ describe 'barbican::db' do
:retry_interval => '<SERVICE DEFAULT>',
:max_overflow => '<SERVICE DEFAULT>',
:pool_timeout => '<SERVICE DEFAULT>',
:mysql_enable_ndb => '<SERVICE DEFAULT>',
)}
# TODO(aschultz): remove once oslo is properly used
@ -52,6 +53,7 @@ describe 'barbican::db' do
:database_retry_interval => '11',
:database_max_overflow => '11',
:database_pool_timeout => '11',
:mysql_enable_ndb => true,
:database_pool_size => '2',
:database_db_max_retries => '-1',
}
@ -68,6 +70,7 @@ describe 'barbican::db' do
:retry_interval => '11',
:max_overflow => '11',
:pool_timeout => '11',
:mysql_enable_ndb => true,
)}
# TODO(aschultz) remove once oslo is properly used