automate ovs datapath configuration

- This change automates generation of
  the datapath_type paramater in the ml2_conf.ini
- If enable_ovs_dpdk is no the datapath type
  will be system else it will be netdev which maintains
  the current default behaviour when dpdk is not enabled.

Change-Id: Iedbf39c621f3c0237f9b9934492b12c600f2c4d3
partial-implementes: bp/ovs-dpdk
This commit is contained in:
Sean Mooney 2017-08-15 15:12:25 +00:00
parent d87a837f36
commit 7eb24fa377
4 changed files with 3 additions and 18 deletions

View File

@ -440,6 +440,7 @@ enable_vmtp: "no"
enable_watcher: "no"
enable_zun: "no"
ovs_datapath: "{{ 'netdev' if enable_ovs_dpdk | bool else 'system' }}"
designate_keystone_user: "designate"
ironic_keystone_user: "ironic"
neutron_keystone_user: "neutron"

View File

@ -78,6 +78,8 @@ extensions = {{ neutron_agent_extensions|map(attribute='name')|join(',') }}
bridge_mappings = {% for bridge in neutron_bridge_name.split(',') %}physnet{{ loop.index0 + 1 }}:{{ bridge }}{% if not loop.last %},{% endif %}{% endfor %}
{% endif %}
{# NOTE: newline above is required for correct config generation. Do not remove. #}
datapath_type = {{ ovs_datapath }}
ovsdb_connection = tcp:127.0.0.1:{{ ovsdb_port }}
{% if enable_nova_fake | bool %}
integration_bridge = br-int-{{ item }}

View File

@ -48,7 +48,6 @@ ovsdpdk_services:
####################
# OVS
####################
ovs_datapath: "netdev"
ovs_bridge_mappings: "{% for bridge in neutron_bridge_name.split(',') %}physnet{{ loop.index0 + 1 }}:{{ bridge }}{% if not loop.last %},{% endif %}{% endfor %}"
ovs_port_mappings: "{% for bridge in neutron_bridge_name.split(',') %} {{ neutron_external_interface.split(',')[loop.index0] }}:{{ bridge }}{% if not loop.last %},{% endif %}{% endfor %}"
dpdk_tunnel_interface : "{{neutron_external_interface}}"

View File

@ -254,23 +254,6 @@ the future, a new config option will be introduced to allow systemd to be used
on all host distros for those who do not wish to enable the network manager
service on ubuntu.
To manage ovs-dpdk the neutron ovs agent must be configured to use
the netdev datapath_type in the ml2.conf. At present this is not automated
and must be set via kolla's external config support. To set the datapath_type
create a file with the following content at
/etc/kolla/config/neutron/ml2_conf.ini
::
[ovs]
datapath_type = netdev
In the future, the requirement to use the external config will be removed by
automatically computing the value of ovs_datapath based on the value of
enable_ovs_dpdk and then using the ovs_datapath variable to template out this
setting in the ml2_conf.ini automatically.
Limitations
-----------