Add mysql_enable_ndb option

Add mysql_enable_ndb parameter to select mysql storage engine.

Change-Id: I24ce322aa209985ff9cf591dca9572521b71fb78
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 13a46814fa
commit 34cb28a6f8
3 changed files with 14 additions and 0 deletions

View File

@ -49,6 +49,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
#
class placement::db (
$database_sqlite_synchronous = $::os_service_default,
$database_connection = 'sqlite:////var/lib/placement/placement.sqlite',
@ -61,6 +66,7 @@ class placement::db (
$database_connection_debug = $::os_service_default,
$database_connection_trace = $::os_service_default,
$database_pool_timeout = $::os_service_default,
$mysql_enable_ndb = $::os_service_default,
) {
include placement::deps
@ -82,5 +88,6 @@ class placement::db (
connection_debug => $database_connection_debug,
connection_trace => $database_connection_trace,
pool_timeout => $database_pool_timeout,
mysql_enable_ndb => $mysql_enable_ndb,
}
}

View File

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

View File

@ -21,6 +21,7 @@ describe 'placement::db' do
:connection_debug => '<SERVICE DEFAULT>',
:connection_trace => '<SERVICE DEFAULT>',
:pool_timeout => '<SERVICE DEFAULT>',
:mysql_enable_ndb => '<SERVICE DEFAULT>',
)}
end
@ -38,6 +39,7 @@ describe 'placement::db' do
:database_connection_debug => '100',
:database_connection_trace => true,
:database_pool_timeout => '10',
:mysql_enable_ndb => true,
}
end
@ -59,6 +61,7 @@ describe 'placement::db' do
:connection_debug => '100',
:connection_trace => true,
:pool_timeout => '10',
:mysql_enable_ndb => true,
)}
end
end