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 - minor version bumped since this patch could break things Change-Id: I9485cc65231b1da8b24efdb7e25551e4d4688d6a
This commit is contained in:
@@ -4,7 +4,7 @@ maintainer_email 'openstack-dev@lists.openstack.org'
|
|||||||
license 'Apache-2.0'
|
license 'Apache-2.0'
|
||||||
description 'The OpenStack Advanced Volume Management service Cinder.'
|
description 'The OpenStack Advanced Volume Management service Cinder.'
|
||||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||||
version '17.0.0'
|
version '17.1.0'
|
||||||
|
|
||||||
%w(ubuntu redhat centos).each do |os|
|
%w(ubuntu redhat centos).each do |os|
|
||||||
supports os
|
supports os
|
||||||
|
|||||||
@@ -64,10 +64,3 @@ service 'iscsitarget' do
|
|||||||
supports status: true, restart: true
|
supports status: true, restart: true
|
||||||
action :enable
|
action :enable
|
||||||
end
|
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
|
it 'upgrades cinder iscsi package' do
|
||||||
expect(chef_run).to upgrade_package 'targetcli'
|
expect(chef_run).to upgrade_package 'targetcli'
|
||||||
end
|
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.set['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
|
||||||
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
|
|
||||||
Reference in New Issue
Block a user