Merge "Add mysql_enable_ndb option"

This commit is contained in:
Zuul 2020-08-30 08:02:39 +00:00 committed by Gerrit Code Review
commit f493b550f2
3 changed files with 13 additions and 0 deletions

View File

@ -67,6 +67,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*]
@ -85,6 +90,7 @@ class nova::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,
# DEPRECATED PARAMETERS
$database_min_pool_size = undef,
) {
@ -122,6 +128,7 @@ class nova::db (
retry_interval => $database_retry_interval_real,
max_overflow => $database_max_overflow_real,
pool_timeout => $database_pool_timeout,
mysql_enable_ndb => $mysql_enable_ndb,
slave_connection => $slave_connection_real,
}
}

View File

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

View File

@ -18,6 +18,7 @@ describe 'nova::db' do
it { should_not contain_nova_config('database/retry_interval') }
it { should_not contain_nova_config('database/max_overflow') }
it { should_not contain_nova_config('database/pool_timeout') }
it { should_not contain_nova_config('database/mysql_enable_ndb') }
end
context 'with overridden parameters' do
@ -40,6 +41,7 @@ describe 'nova::db' do
:retry_interval => '<SERVICE DEFAULT>',
:max_overflow => '<SERVICE DEFAULT>',
:pool_timeout => '<SERVICE DEFAULT>',
:mysql_enable_ndb => '<SERVICE DEFAULT>',
)}
it { should contain_nova_config('api_database/connection').with_value('mysql+pymysql://user:pass@db/db2').with_secret(true) }