Change ceph_init_override param for Debian

manifests/backend/rbd.pp attempts to write in /etc/init, when
upstart has long gone. The result is that it just fails to run.
So we change the param ceph_init_override to /etc/default/cinder-volume.

Change-Id: I7666c775f4d269f214d3f853e56d0eb076834164
This commit is contained in:
Thomas Goirand 2019-04-13 21:34:37 +02:00 committed by Rocky
parent 29e221fe55
commit 9fd1ac0787
3 changed files with 6 additions and 6 deletions

View File

@ -151,8 +151,8 @@ define cinder::backend::rbd (
case $::osfamily {
'Debian': {
$override_line = "env CEPH_ARGS=\"--id ${rbd_user}\""
$override_match = '^env CEPH_ARGS='
$override_line = "CEPH_ARGS=\"--id ${rbd_user}\""
$override_match = '^CEPH_ARGS='
}
'RedHat': {
$override_line = "export CEPH_ARGS=\"--id ${rbd_user}\""

View File

@ -23,7 +23,7 @@ class cinder::params {
$db_sync_command = 'cinder-manage db sync'
$tgt_package_name = 'tgt'
$tgt_service_name = 'tgt'
$ceph_init_override = '/etc/init/cinder-volume.override'
$ceph_init_override = '/etc/default/cinder-volume'
$ceph_common_package_name = 'ceph-common'
$target_helper = 'tgtadm'
$lio_package_name = 'targetcli'

View File

@ -98,13 +98,13 @@ describe 'cinder::backend::rbd' do
end
shared_examples 'cinder::backend::rbd on Debian' do
it { is_expected.to contain_file('/etc/init/cinder-volume.override').with(
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 => /env CEPH_ARGS=\"--id test\"/,
:path => '/etc/init/cinder-volume.override',
:line => /CEPH_ARGS=\"--id test\"/,
:path => '/etc/default/cinder-volume',
:notify => 'Anchor[cinder::service::begin]'
)}
end