Allow RBD host to be configurable
Most sites using ceph with cinder are going to have already set the host value. This change allows those sites to override the default and not break existing volumes. It also moves the tests cases from the volume class to the backend define. Lastly, it renames the parameter from host to backend_host, since host is deprecated with Kilo. Change-Id: I43e4d3b7ae1672ea0c551c6c7267f0c38bb9842f
This commit is contained in:
@@ -38,6 +38,7 @@ describe 'cinder::backend::rbd' do
|
||||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_pool").with_value(req_params[:rbd_pool])
|
||||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_user").with_value(req_params[:rbd_user])
|
||||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_secret_uuid").with_value(req_params[:rbd_secret_uuid])
|
||||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/backend_host").with_value('rbd:'"#{req_params[:rbd_pool]}")
|
||||
is_expected.to contain_file('/etc/init/cinder-volume.override').with(:ensure => 'present')
|
||||
is_expected.to contain_file_line('set initscript env').with(
|
||||
:line => /env CEPH_ARGS=\"--id test\"/,
|
||||
@@ -72,6 +73,18 @@ describe 'cinder::backend::rbd' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'override backend_host parameter' do
|
||||
before do
|
||||
params.merge!({:backend_host => 'test_host.fqdn.com' })
|
||||
end
|
||||
|
||||
it 'configure rbd backend with specific hostname' do
|
||||
is_expected.to contain_cinder_config('rbd-ssd/backend_host').with({
|
||||
:value => 'test_host.fqdn.com',
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe 'with RedHat' do
|
||||
|
||||
Reference in New Issue
Block a user