Add mysql_enable_ndb option

Add mysql_enable_ndb parameter to select mysql storage engine.

Change-Id: Icb359deceaadbb01a35f05e8fba2c8a1fd265019
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 872a19e083
commit 5b796c0f67
3 changed files with 14 additions and 0 deletions

View File

@ -33,6 +33,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
#
# [*database_db_max_retries*]
# (Optional) Maximum retries in case of connection error or deadlock error
# before error is raised. Set to -1 to specify an infinite retry count.
@ -52,6 +57,7 @@ class rally::db (
$database_retry_interval = $::os_service_default,
$database_max_overflow = $::os_service_default,
$database_pool_timeout = $::os_service_default,
$mysql_enable_ndb = $::os_service_default,
$database_db_max_retries = $::os_service_default,
# DEPRECATED PARAMETERS
$database_min_pool_size = undef,
@ -92,6 +98,7 @@ class rally::db (
retry_interval => $database_retry_interval_real,
max_overflow => $database_max_overflow_real,
pool_timeout => $database_pool_timeout,
mysql_enable_ndb => $mysql_enable_ndb,
db_max_retries => $database_db_max_retries,
}

View File

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

View File

@ -14,6 +14,7 @@ describe 'rally::db' do
:retry_interval => '<SERVICE DEFAULT>',
:max_overflow => '<SERVICE DEFAULT>',
:pool_timeout => '<SERVICE DEFAULT>',
:mysql_enable_ndb => '<SERVICE DEFAULT>',
)}
it { should contain_file('/var/lib/rally').with(
@ -35,6 +36,7 @@ describe 'rally::db' do
:database_max_pool_size => '11',
:database_max_overflow => '21',
:database_pool_timeout => '21',
:mysql_enable_ndb => true,
:database_db_max_retries => '-1',
}
end
@ -50,6 +52,7 @@ describe 'rally::db' do
:retry_interval => '11',
:max_overflow => '21',
:pool_timeout => '21',
:mysql_enable_ndb => true,
)}
it { should_not contain_file('create_sqlite_directory') }