Creates an empty init script override file if necessary
Without this patch, puppet runs were failing with the following error: (/Stage[main]/Cinder::Volume::Rbd/File_line[set initscript env]) Could not evaluate: No such file or directory - /etc/init/cinder-volume.override Change-Id: Ibf42b4b09441c8a044f50af62246be31fe584e1b
This commit is contained in:
parent
c93e26a361
commit
7690d7c223
@ -52,6 +52,11 @@ class cinder::volume::rbd (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Creates an empty file if it doesn't yet exist
|
||||||
|
file { $::cinder::params::ceph_init_override:
|
||||||
|
ensure => present,
|
||||||
|
}
|
||||||
|
|
||||||
file_line { 'set initscript env':
|
file_line { 'set initscript env':
|
||||||
line => $override_line,
|
line => $override_line,
|
||||||
path => $::cinder::params::ceph_init_override,
|
path => $::cinder::params::ceph_init_override,
|
||||||
|
@ -30,6 +30,9 @@ describe 'cinder::volume::rbd' do
|
|||||||
'test')
|
'test')
|
||||||
should contain_cinder_config('DEFAULT/rbd_secret_uuid').with_value(
|
should contain_cinder_config('DEFAULT/rbd_secret_uuid').with_value(
|
||||||
'0123456789')
|
'0123456789')
|
||||||
|
should contain_file('/etc/init/cinder-volume.override').with(
|
||||||
|
:ensure => 'present'
|
||||||
|
)
|
||||||
should contain_file_line('set initscript env').with(
|
should contain_file_line('set initscript env').with(
|
||||||
:line => /env CEPH_ARGS=\"--id test\"/,
|
:line => /env CEPH_ARGS=\"--id test\"/,
|
||||||
:path => '/etc/init/cinder-volume.override',
|
:path => '/etc/init/cinder-volume.override',
|
||||||
@ -47,6 +50,12 @@ describe 'cinder::volume::rbd' do
|
|||||||
req_params
|
req_params
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should ensure that the cinder-volume sysconfig file is present' do
|
||||||
|
should contain_file('/etc/sysconfig/openstack-cinder-volume').with(
|
||||||
|
:ensure => 'present'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
it 'should configure RedHat init override' do
|
it 'should configure RedHat init override' do
|
||||||
should contain_file_line('set initscript env').with(
|
should contain_file_line('set initscript env').with(
|
||||||
:line => /export CEPH_ARGS=\"--id test\"/,
|
:line => /export CEPH_ARGS=\"--id test\"/,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user