diff --git a/manifests/db.pp b/manifests/db.pp index 3a454233..8540593a 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 +# # DEPRECATED PARAMETERS # # [*database_min_pool_size*] @@ -53,6 +58,7 @@ class ironic::db ( $database_max_overflow = $::os_service_default, $database_db_max_retries = $::os_service_default, $database_pool_timeout = $::os_service_default, + $mysql_enable_ndb = $::os_service_default, # DEPRECATED PARAMETERS $database_min_pool_size = undef, ) { @@ -85,6 +91,7 @@ class ironic::db ( max_overflow => $database_max_overflow_real, db_max_retries => $database_db_max_retries, pool_timeout => $database_pool_timeout, + mysql_enable_ndb => $mysql_enable_ndb, } } diff --git a/manifests/inspector/db.pp b/manifests/inspector/db.pp index b9215b19..f06d968f 100644 --- a/manifests/inspector/db.pp +++ b/manifests/inspector/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 +# # DEPRECATED PARAMETERS # # [*database_min_pool_size*] @@ -53,6 +58,7 @@ class ironic::inspector::db ( $database_max_pool_size = $::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, ) { @@ -77,6 +83,7 @@ class ironic::inspector::db ( retry_interval => $database_retry_interval, max_overflow => $database_max_overflow, pool_timeout => $database_pool_timeout, + mysql_enable_ndb => $mysql_enable_ndb, } } diff --git a/releasenotes/notes/add_mysql_enable_ndb-option-ae11e03429aa8b48.yaml b/releasenotes/notes/add_mysql_enable_ndb-option-ae11e03429aa8b48.yaml new file mode 100644 index 00000000..2e28c5c6 --- /dev/null +++ b/releasenotes/notes/add_mysql_enable_ndb-option-ae11e03429aa8b48.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Add mysql_enable_ndb parameter to select mysql storage engine. diff --git a/spec/classes/ironic_db_spec.rb b/spec/classes/ironic_db_spec.rb index 10df1171..b830f3d6 100644 --- a/spec/classes/ironic_db_spec.rb +++ b/spec/classes/ironic_db_spec.rb @@ -12,6 +12,7 @@ describe 'ironic::db' do :max_pool_size => '', :max_retries => '', :pool_timeout => '', + :mysql_enable_ndb => '', :retry_interval => '', :max_overflow => '', )} @@ -25,6 +26,7 @@ describe 'ironic::db' do :database_max_pool_size => '21', :database_max_retries => '11', :database_pool_timeout => '21', + :mysql_enable_ndb => true, :database_max_overflow => '21', :database_retry_interval => '11', :database_db_max_retries => '-1', @@ -42,6 +44,7 @@ describe 'ironic::db' do :retry_interval => '11', :max_overflow => '21', :pool_timeout => '21', + :mysql_enable_ndb => true, )} end end diff --git a/spec/classes/ironic_inspector_db_spec.rb b/spec/classes/ironic_inspector_db_spec.rb index 4a35ca36..4708f22b 100644 --- a/spec/classes/ironic_inspector_db_spec.rb +++ b/spec/classes/ironic_inspector_db_spec.rb @@ -12,6 +12,7 @@ describe 'ironic::inspector::db' do :max_retries => '', :db_max_retries => '', :pool_timeout => '', + :mysql_enable_ndb => '', :retry_interval => '', :max_overflow => '', )} @@ -27,6 +28,7 @@ describe 'ironic::inspector::db' do :database_db_max_retries => '11', :database_max_overflow => '21', :database_pool_timeout => '21', + :mysql_enable_ndb => true, :database_retry_interval => '11', } end @@ -37,6 +39,7 @@ describe 'ironic::inspector::db' do :max_retries => '11', :db_max_retries => '11', :pool_timeout => '21', + :mysql_enable_ndb => true, :retry_interval => '11', :max_overflow => '21', )}