remove targets.conf
- since the target package ships the default conf we won't need this anymore - the cinder target.conf is shipped by the cinder package to the right directory - removed targets.conf.erb since this isn't used anymore - removed obsolete specs Change-Id: I9485cc65231b1da8b24efdb7e25551e4d4688d6a
This commit is contained in:
parent
42168ec938
commit
8efd295421
@ -64,10 +64,3 @@ service 'iscsitarget' do
|
||||
supports status: true, restart: true
|
||||
action :enable
|
||||
end
|
||||
|
||||
template '/etc/target/targets.conf' do
|
||||
source 'targets.conf.erb'
|
||||
mode 0o0600
|
||||
notifies :restart, 'service[iscsitarget]', :immediately
|
||||
notifies :restart, 'service[cinder-volume]', :immediately
|
||||
end
|
||||
|
@ -45,26 +45,5 @@ describe 'openstack-block-storage::volume' do
|
||||
it 'upgrades cinder iscsi package' do
|
||||
expect(chef_run).to upgrade_package 'targetcli-fb'
|
||||
end
|
||||
|
||||
describe 'targets.conf' do
|
||||
let(:file) { chef_run.template('/etc/target/targets.conf') }
|
||||
|
||||
it 'should create the targets.conf' do
|
||||
expect(chef_run).to create_template(file.name).with(
|
||||
mode: 0o600
|
||||
)
|
||||
end
|
||||
|
||||
it 'notifies iscsi restart' do
|
||||
expect(file).to notify('service[iscsitarget]').to(:restart)
|
||||
end
|
||||
|
||||
it 'has ubuntu include' do
|
||||
node.override['openstack']['block-storage']['volume']['volumes_dir'] = 'volumes_dir_value'
|
||||
|
||||
expect(chef_run).to render_file(file.name).with_content('include /etc/tgt/conf.d/*.conf')
|
||||
expect(chef_run).not_to render_file(file.name).with_content('include volumes_dir_value/*')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,9 +0,0 @@
|
||||
<%= node["openstack"]["block-storage"]["custom_template_banner"] %>
|
||||
|
||||
<% if node['platform_family'].include?('rhel') %>
|
||||
include <%= node['openstack']['block-storage']['conf']['DEFAULT']['state_path'] %>/volumes/*
|
||||
<% end %>
|
||||
<% if node['platform_family'].include?('debian') %>
|
||||
include /etc/tgt/conf.d/*.conf
|
||||
<% end %>
|
||||
default-driver iscsi
|
Loading…
Reference in New Issue
Block a user