From 8efd2954211b33f3f315f806bbec382cc0751ecb Mon Sep 17 00:00:00 2001 From: Christoph Albers Date: Tue, 26 Mar 2019 15:55:41 +0100 Subject: [PATCH] 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 --- recipes/volume.rb | 7 ------- spec/volume_spec.rb | 21 --------------------- templates/default/targets.conf.erb | 9 --------- 3 files changed, 37 deletions(-) delete mode 100644 templates/default/targets.conf.erb diff --git a/recipes/volume.rb b/recipes/volume.rb index 79edf8b..8127430 100644 --- a/recipes/volume.rb +++ b/recipes/volume.rb @@ -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 diff --git a/spec/volume_spec.rb b/spec/volume_spec.rb index 7a402d1..4791fa1 100644 --- a/spec/volume_spec.rb +++ b/spec/volume_spec.rb @@ -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 diff --git a/templates/default/targets.conf.erb b/templates/default/targets.conf.erb deleted file mode 100644 index 27a4139..0000000 --- a/templates/default/targets.conf.erb +++ /dev/null @@ -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