From 448056ebba04262568b212999fbbed8276cb4b2c 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: I539b290721da68e1b355528b074f52ebbb0d474e Depends-On: https://review.opendev.org/#/c/748067 Closes-Bug: #1892952 --- manifests/db.pp | 7 +++++++ .../add_mysql_enable_ndb-option-ba6e96cbf544cf8b.yaml | 4 ++++ spec/classes/ceilometer_db_spec.rb | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/add_mysql_enable_ndb-option-ba6e96cbf544cf8b.yaml diff --git a/manifests/db.pp b/manifests/db.pp index 508b9fb0..8608f046 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -44,6 +44,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*] @@ -59,6 +64,7 @@ class ceilometer::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, $sync_db = true, # DEPRECATED PARAMETERS $database_min_pool_size = undef, @@ -79,6 +85,7 @@ class ceilometer::db ( max_pool_size => $database_max_pool_size, max_overflow => $database_max_overflow, pool_timeout => $database_pool_timeout, + mysql_enable_ndb => $mysql_enable_ndb, } if $sync_db { diff --git a/releasenotes/notes/add_mysql_enable_ndb-option-ba6e96cbf544cf8b.yaml b/releasenotes/notes/add_mysql_enable_ndb-option-ba6e96cbf544cf8b.yaml new file mode 100644 index 00000000..2e28c5c6 --- /dev/null +++ b/releasenotes/notes/add_mysql_enable_ndb-option-ba6e96cbf544cf8b.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Add mysql_enable_ndb parameter to select mysql storage engine. diff --git a/spec/classes/ceilometer_db_spec.rb b/spec/classes/ceilometer_db_spec.rb index bf4aa15e..84c80ef2 100644 --- a/spec/classes/ceilometer_db_spec.rb +++ b/spec/classes/ceilometer_db_spec.rb @@ -14,6 +14,7 @@ describe 'ceilometer::db' do :retry_interval => '', :max_overflow => '', :pool_timeout => '', + :mysql_enable_ndb => '', )} it { should contain_class('ceilometer::db::sync') } @@ -30,6 +31,7 @@ describe 'ceilometer::db' do :database_retry_interval => '11', :database_max_overflow => '21', :database_pool_timeout => '21', + :mysql_enable_ndb => true, :sync_db => false } end @@ -44,6 +46,7 @@ describe 'ceilometer::db' do :retry_interval => '11', :max_overflow => '21', :pool_timeout => '21', + :mysql_enable_ndb => true, )} it { should_not contain_class('ceilometer::db::sync') }