Fix LinuxBridge file paths and names for RHEL
This was incorrectly assuming the path used on Ubuntu/Debian. This correctly points to the correct location that systemd uses. Change-Id: I425f4dc565f7c6d5b27422f1023b428e91f71d7a Signed-off-by: Lance Albertson <lance@osuosl.org>
This commit is contained in:
parent
654c94370f
commit
69454c062f
|
@ -36,10 +36,18 @@ platform_options['neutron_linuxbridge_agent_packages'].each do |pkg|
|
||||||
end
|
end
|
||||||
|
|
||||||
node.default['openstack']['network']['plugins']['linuxbridge'].tap do |lb|
|
node.default['openstack']['network']['plugins']['linuxbridge'].tap do |lb|
|
||||||
lb['path'] =
|
case node['platform_family']
|
||||||
'/etc/neutron/plugins/linuxbridge'
|
when 'fedora', 'rhel'
|
||||||
lb['filename'] =
|
lb['path'] =
|
||||||
'linuxbridge_conf.ini'
|
'/etc/neutron/plugins/ml2'
|
||||||
|
lb['filename'] =
|
||||||
|
'linuxbridge_agent.ini'
|
||||||
|
when 'debian'
|
||||||
|
lb['path'] =
|
||||||
|
'/etc/neutron/plugins/linuxbridge'
|
||||||
|
lb['filename'] =
|
||||||
|
'linuxbridge_conf.ini'
|
||||||
|
end
|
||||||
lb['conf']['securitygroup']['firewall_driver'] =
|
lb['conf']['securitygroup']['firewall_driver'] =
|
||||||
'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver'
|
'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver'
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,12 +17,12 @@ describe 'openstack-network::ml2_linuxbridge' do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
node.set['openstack']['network']['plugins']['linuxbridge']['path'] =
|
node.set['openstack']['network']['plugins']['linuxbridge']['path'] =
|
||||||
'/etc/neutron/plugins/linuxbridge'
|
'/etc/neutron/plugins/ml2'
|
||||||
node.set['openstack']['network']['plugins']['linuxbridge']['filename'] =
|
node.set['openstack']['network']['plugins']['linuxbridge']['filename'] =
|
||||||
'linuxbridge_conf.ini'
|
'linuxbridge_agent.ini'
|
||||||
end
|
end
|
||||||
it 'creates the /etc/neutron/plugins/linuxbridge agent directory' do
|
it 'creates the /etc/neutron/plugins/ml2 agent directory' do
|
||||||
expect(chef_run).to create_directory('/etc/neutron/plugins/linuxbridge').with(
|
expect(chef_run).to create_directory('/etc/neutron/plugins/ml2').with(
|
||||||
owner: 'neutron',
|
owner: 'neutron',
|
||||||
group: 'neutron',
|
group: 'neutron',
|
||||||
mode: 0700
|
mode: 0700
|
||||||
|
@ -32,9 +32,9 @@ describe 'openstack-network::ml2_linuxbridge' do
|
||||||
expect(chef_run).to include_recipe('openstack-network::plugin_config')
|
expect(chef_run).to include_recipe('openstack-network::plugin_config')
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini' do
|
describe '/etc/neutron/plugins/ml2/linuxbridge_agent.ini' do
|
||||||
let(:file) do
|
let(:file) do
|
||||||
chef_run.template('/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini')
|
chef_run.template('/etc/neutron/plugins/ml2/linuxbridge_agent.ini')
|
||||||
end
|
end
|
||||||
[
|
[
|
||||||
/^firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver$/
|
/^firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver$/
|
||||||
|
@ -57,7 +57,7 @@ describe 'openstack-network::ml2_linuxbridge' do
|
||||||
end
|
end
|
||||||
it do
|
it do
|
||||||
service = chef_run.service('neutron-linuxbridge-agent')
|
service = chef_run.service('neutron-linuxbridge-agent')
|
||||||
expect(service).to(subscribe_to('template[/etc/neutron/neutron.conf]').on(:restart).delayed) && subscribe_to('template[/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini]').on(:restart).delayed
|
expect(service).to(subscribe_to('template[/etc/neutron/neutron.conf]').on(:restart).delayed) && subscribe_to('template[/etc/neutron/plugins/ml2/linuxbridge_agent.ini]').on(:restart).delayed
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue