Merge "rbd: Simplify handling of rbd_cluster_name"

This commit is contained in:
Zuul 2024-04-01 23:09:18 +00:00 committed by Gerrit Code Review
commit 73638202a2
2 changed files with 2 additions and 8 deletions

View File

@ -143,12 +143,6 @@ define cinder::backend::rbd (
include cinder::params
$rbd_cluster_name = basename($rbd_ceph_conf, '.conf')
if $rbd_cluster_name == 'ceph' {
# Do not pass a parameter value in order to avoid service restarts
$rbd_cluster_name_real = $facts['os_service_default']
} else {
$rbd_cluster_name_real = $rbd_cluster_name
}
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
@ -166,7 +160,7 @@ define cinder::backend::rbd (
"${name}/rados_connection_interval": value => $rados_connection_interval;
"${name}/rados_connection_retries": value => $rados_connection_retries;
"${name}/rbd_store_chunk_size": value => $rbd_store_chunk_size;
"${name}/rbd_cluster_name": value => $rbd_cluster_name_real;
"${name}/rbd_cluster_name": value => $rbd_cluster_name;
"${name}/report_dynamic_total_capacity": value => $report_dynamic_total_capacity;
"${name}/rbd_exclusive_cinder_pool": value => $rbd_exclusive_cinder_pool;
"${name}/enable_deferred_deletion": value => $enable_deferred_deletion;

View File

@ -37,7 +37,7 @@ describe 'cinder::backend::rbd' do
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_interval").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_retries").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_store_chunk_size").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_cluster_name").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_cluster_name").with_value('ceph')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/report_dynamic_total_capacity").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_exclusive_cinder_pool").with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/enable_deferred_deletion").with_value('<SERVICE DEFAULT>')