Merge "rbd: Stop overriding CEPH_ARGS environment"
This commit is contained in:
commit
24988ff24b
@ -195,28 +195,4 @@ define cinder::backend::rbd (
|
|||||||
tag => 'cinder-support-package'})
|
tag => 'cinder-support-package'})
|
||||||
|
|
||||||
create_resources('cinder_config', $extra_options)
|
create_resources('cinder_config', $extra_options)
|
||||||
|
|
||||||
case $facts['os']['family'] {
|
|
||||||
'Debian': {
|
|
||||||
$override_line = "CEPH_ARGS=\"--id ${rbd_user}\""
|
|
||||||
$override_match = '^CEPH_ARGS='
|
|
||||||
}
|
|
||||||
'RedHat': {
|
|
||||||
$override_line = "export CEPH_ARGS=\"--id ${rbd_user}\""
|
|
||||||
$override_match = '^export CEPH_ARGS='
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
fail("unsupported osfamily ${facts['os']['family']}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Creates an empty file if it doesn't yet exist
|
|
||||||
ensure_resource('file', $::cinder::params::ceph_init_override, {'ensure' => 'present'})
|
|
||||||
|
|
||||||
file_line { "set initscript env ${name}":
|
|
||||||
line => $override_line,
|
|
||||||
path => $::cinder::params::ceph_init_override,
|
|
||||||
notify => Anchor['cinder::service::begin'],
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -135,30 +135,6 @@ describe 'cinder::backend::rbd' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples 'cinder::backend::rbd on Debian' do
|
|
||||||
it { is_expected.to contain_file('/etc/default/cinder-volume').with(
|
|
||||||
:ensure => 'present'
|
|
||||||
)}
|
|
||||||
|
|
||||||
it { is_expected.to contain_file_line('set initscript env rbd-ssd').with(
|
|
||||||
:line => /CEPH_ARGS=\"--id test\"/,
|
|
||||||
:path => '/etc/default/cinder-volume',
|
|
||||||
:notify => 'Anchor[cinder::service::begin]'
|
|
||||||
)}
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples 'cinder::backend::rbd on RedHat' do
|
|
||||||
it { is_expected.to contain_file('/etc/sysconfig/openstack-cinder-volume').with(
|
|
||||||
:ensure => 'present'
|
|
||||||
)}
|
|
||||||
|
|
||||||
it { is_expected.to contain_file_line('set initscript env rbd-ssd').with(
|
|
||||||
:line => /export CEPH_ARGS=\"--id test\"/,
|
|
||||||
:path => '/etc/sysconfig/openstack-cinder-volume',
|
|
||||||
:notify => 'Anchor[cinder::service::begin]'
|
|
||||||
)}
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os({
|
on_supported_os({
|
||||||
:supported_os => OSDefaults.get_supported_os
|
:supported_os => OSDefaults.get_supported_os
|
||||||
}).each do |os,facts|
|
}).each do |os,facts|
|
||||||
@ -168,7 +144,6 @@ describe 'cinder::backend::rbd' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like 'cinder::backend::rbd'
|
it_behaves_like 'cinder::backend::rbd'
|
||||||
it_behaves_like "cinder::backend::rbd on #{facts[:os]['family']}"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user