From 7edf617586d7791825b567e631e171e50db47ec3 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Wed, 26 Aug 2020 11:53:17 +0800 Subject: [PATCH] Add mysql_enable_ndb option Add mysql_enable_ndb parameter to select mysql storage engine. Change-Id: I2f6351c29e50070bc712879642fd509d9797ddb0 Depends-On: https://review.opendev.org/#/c/748067 Closes-Bug: #1892952 --- manifests/db.pp | 7 +++++++ .../add_mysql_enable_ndb-option-9619cb984571cde2.yaml | 4 ++++ spec/classes/keystone_db_spec.rb | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/add_mysql_enable_ndb-option-9619cb984571cde2.yaml diff --git a/manifests/db.pp b/manifests/db.pp index 0890e6e78..4ba5dc514 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -38,6 +38,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 keystone::db ( $database_db_max_retries = $::os_service_default, $database_connection = 'sqlite:////var/lib/keystone/keystone.sqlite', @@ -47,6 +52,7 @@ class keystone::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, ) { include keystone::deps @@ -73,6 +79,7 @@ class keystone::db ( retry_interval => $database_retry_interval_real, max_overflow => $database_max_overflow_real, pool_timeout => $database_pool_timeout, + mysql_enable_ndb => $mysql_enable_ndb, } } diff --git a/releasenotes/notes/add_mysql_enable_ndb-option-9619cb984571cde2.yaml b/releasenotes/notes/add_mysql_enable_ndb-option-9619cb984571cde2.yaml new file mode 100644 index 000000000..2e28c5c66 --- /dev/null +++ b/releasenotes/notes/add_mysql_enable_ndb-option-9619cb984571cde2.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Add mysql_enable_ndb parameter to select mysql storage engine. diff --git a/spec/classes/keystone_db_spec.rb b/spec/classes/keystone_db_spec.rb index 6e7634703..70ee921b4 100644 --- a/spec/classes/keystone_db_spec.rb +++ b/spec/classes/keystone_db_spec.rb @@ -14,6 +14,7 @@ describe 'keystone::db' do :retry_interval => '', :max_overflow => '', :pool_timeout => '', + :mysql_enable_ndb => '', )} end @@ -27,6 +28,7 @@ describe 'keystone::db' do :database_max_retries => '11', :database_max_overflow => '21', :database_pool_timeout => '21', + :mysql_enable_ndb => true, :database_retry_interval => '11', } end @@ -42,6 +44,7 @@ describe 'keystone::db' do :retry_interval => '11', :max_overflow => '21', :pool_timeout => '21', + :mysql_enable_ndb => true, )} end end