Fix ubuntu ml2_conf missing ovs section
Used the existing ovs conf as a partial template to simply include in the ml2 conf. This keeps all the attributes the same. A more detailed spec will have to be done after some refactoring to allow for sections to be tested. Please give this idea a try, it seems to allow me to setup neutron on ubuntu with ml2. I'm working toward using this as a basis for getting the repo aio_neutron test working. Change-Id: Ia988f3d7ef1c280c40b55cea4f455710f673dd32 Closes-Bug: #1314751
This commit is contained in:
parent
7fdaa2835e
commit
7963c596c9
|
@ -327,6 +327,7 @@ when 'midonet'
|
|||
|
||||
when 'ml2'
|
||||
|
||||
openvswitch_endpoint = endpoint 'network-openvswitch'
|
||||
template_file = '/etc/neutron/plugins/ml2/ml2_conf.ini'
|
||||
mechanism_drivers = node['openstack']['network']['ml2']['mechanism_drivers']
|
||||
if node['openstack']['network']['l3']['router_distributed'] == 'auto'
|
||||
|
@ -339,10 +340,14 @@ when 'ml2'
|
|||
group node['openstack']['network']['platform']['group']
|
||||
mode 00644
|
||||
variables(
|
||||
mechanism_drivers: mechanism_drivers
|
||||
mechanism_drivers: mechanism_drivers,
|
||||
local_ip: openvswitch_endpoint.host
|
||||
)
|
||||
|
||||
notifies :restart, 'service[neutron-server]', :delayed if role_match
|
||||
if node['recipes'].include?('openstack-network::openvswitch')
|
||||
notifies :restart, 'service[neutron-plugin-openvswitch-agent]', :delayed
|
||||
end
|
||||
end
|
||||
|
||||
when 'nec'
|
||||
|
|
|
@ -35,6 +35,9 @@ describe 'openstack-network' do
|
|||
group: 'neutron'
|
||||
)
|
||||
end
|
||||
it 'does not include the ovs section' do
|
||||
expect(chef_run).not_to render_file(file.name).with_content(/^[OVS]/)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -59,6 +59,8 @@ describe 'openstack-network' do
|
|||
end
|
||||
end
|
||||
|
||||
include_context 'endpoint-stubs'
|
||||
|
||||
it_behaves_like 'core plugin common configurator',
|
||||
'bigswitch',
|
||||
PLUGIN_MAP['bigswitch'],
|
||||
|
@ -82,6 +84,18 @@ describe 'openstack-network' do
|
|||
vxlan_group: '',
|
||||
enable_security_group: 'True',
|
||||
enable_ipset: 'True'
|
||||
# TODO: MRV
|
||||
# OVS section is in there, need refactor this code to be able to
|
||||
# handle sections and different attribute namespaces
|
||||
#
|
||||
# tenant_network_type: 'local',
|
||||
# enable_tunneling: 'False',
|
||||
# integration_bridge: 'br-int',
|
||||
# tunnel_bridge: 'br-tun',
|
||||
# local_ip: 'openvswitch_host',
|
||||
# polling_interval: '2',
|
||||
# veth_mtu: '1500',
|
||||
# firewall_driver: 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||
|
||||
describe 'cisco' do
|
||||
let(:nexus_switch_value) do {
|
||||
|
@ -277,9 +291,6 @@ describe 'openstack-network' do
|
|||
include_context 'endpoint-stubs'
|
||||
before do
|
||||
node.set['openstack']['network']['core_plugin'] = 'openvswitch'
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:endpoint)
|
||||
.with('network-openvswitch')
|
||||
.and_return(double(host: 'openvswitch_host'))
|
||||
end
|
||||
|
||||
it_behaves_like 'core plugin common configurator',
|
||||
|
|
|
@ -118,6 +118,9 @@ end
|
|||
|
||||
shared_context 'endpoint-stubs' do
|
||||
before do
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:endpoint)
|
||||
.with('network-openvswitch')
|
||||
.and_return(double(host: 'openvswitch_host', port: 'openvswitch_port'))
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:endpoint)
|
||||
.with('network-api-bind')
|
||||
.and_return(double(host: 'network_host', port: 'network_port'))
|
||||
|
|
|
@ -70,3 +70,8 @@ enable_security_group = <%= node['openstack']['network']['ml2']['enable_security
|
|||
# Use ipset to speed-up the iptables security groups. Enabling ipset support
|
||||
# requires that ipset is installed on L2 agent node.
|
||||
enable_ipset = <%= node['openstack']['network']['ml2']['enable_ipset'] %>
|
||||
|
||||
<% if node['platform_family'] == 'debian' -%>
|
||||
# For ubuntu, pull in the openvswitch configuration
|
||||
<%= render 'plugins/openvswitch/ovs_neutron_plugin.ini.erb' -%>
|
||||
<% end -%>
|
||||
|
|
Loading…
Reference in New Issue