Dynamic Neutron OVS agent tunnel_types and local_ip config

Both of these configs are now dynamic based on the presence
of tunnel type networks in var neutron_ml2_drivers_type

Change-Id: I4f03b707b0d171b14133cc9d1723458d9b1b3668
Implements: blueprint support-openvswitch
This commit is contained in:
Travis Truman 2016-06-22 14:18:44 -04:00
parent a34729a601
commit 30439c262c
3 changed files with 26 additions and 5 deletions

View File

@ -114,7 +114,7 @@ neutron_plugins:
driver_interface: neutron.agent.linux.interface.BridgeInterfaceDriver driver_interface: neutron.agent.linux.interface.BridgeInterfaceDriver
drivers_type: "{{ neutron_ml2_drivers_type }}" drivers_type: "{{ neutron_ml2_drivers_type }}"
l2_population: "{{ neutron_l2_population }}" l2_population: "{{ neutron_l2_population }}"
mechanisms: "linuxbridge,l2population" mechanisms: "linuxbridge{% if neutron_l2_population | bool %},l2population{% endif %}"
plugin_conf_ini_overrides: "{{ neutron_ml2_conf_ini_overrides }}" plugin_conf_ini_overrides: "{{ neutron_ml2_conf_ini_overrides }}"
plugin_core: neutron.plugins.ml2.plugin.Ml2Plugin plugin_core: neutron.plugins.ml2.plugin.Ml2Plugin
plugin_ini: plugins/ml2/ml2_conf.ini plugin_ini: plugins/ml2/ml2_conf.ini
@ -123,7 +123,7 @@ neutron_plugins:
driver_interface: neutron.agent.linux.interface.OVSInterfaceDriver driver_interface: neutron.agent.linux.interface.OVSInterfaceDriver
drivers_type: "{{ neutron_ml2_drivers_type }}" drivers_type: "{{ neutron_ml2_drivers_type }}"
l2_population: "{{ neutron_l2_population }}" l2_population: "{{ neutron_l2_population }}"
mechanisms: "openvswitch,l2population" mechanisms: "openvswitch{% if neutron_l2_population | bool %},l2population{% endif %}"
plugin_conf_ini_overrides: "{{ neutron_ml2_conf_ini_overrides }}" plugin_conf_ini_overrides: "{{ neutron_ml2_conf_ini_overrides }}"
plugin_core: neutron.plugins.ml2.plugin.Ml2Plugin plugin_core: neutron.plugins.ml2.plugin.Ml2Plugin
plugin_ini: plugins/ml2/ml2_conf.ini plugin_ini: plugins/ml2/ml2_conf.ini
@ -344,9 +344,17 @@ neutron_l3_ha_net_cidr: 169.254.192.0/18
neutron_dhcp_config: neutron_dhcp_config:
log-facility: "/var/log/neutron/neutron-dnsmasq.log" log-facility: "/var/log/neutron/neutron-dnsmasq.log"
# Types of networks supported by the ml2 plugin _neutron_non_tunnel_types:
- flat
- vlan
- local
# ml2 network type drivers to load
neutron_ml2_drivers_type: "flat,vlan,vxlan,local" neutron_ml2_drivers_type: "flat,vlan,vxlan,local"
# Tunnel network types used by the OVS agent
neutron_tunnel_types: "{{ neutron_ml2_drivers_type.split(',') | difference(_neutron_non_tunnel_types) | join(',') }}"
# Enable or disable L2 Population. # Enable or disable L2 Population.
neutron_l2_population: "False" neutron_l2_population: "False"

View File

@ -0,0 +1,12 @@
---
features:
- The ``os_neutron`` role now determines the default configuration for
openvswitch-agent ``tunnel_types`` and the presence or absence of
``local_ip`` configuration based on the value of
``neutron_ml2_drivers_type``. Deployers may directly control this
configuration by overriding the ``neutron_tunnel_types`` variable .
- The ``os_neutron`` role now configures neutron ml2 to load the
``l2_population`` mechanism driver by default based on the value of
``neutron_l2_population``. Deployers may directly control the neutron ml2
mechanism drivers list by overriding the ``mechanisms`` variable in the
``neutron_plugins`` dictionary.

View File

@ -2,15 +2,16 @@
# Linux bridge agent physical interface mappings # Linux bridge agent physical interface mappings
[ovs] [ovs]
{% if neutron_tunnel_types | length > 0 %}
local_ip = {{ neutron_local_ip }} local_ip = {{ neutron_local_ip }}
{% endif %}
{% if neutron_provider_networks.network_mappings is defined %} {% if neutron_provider_networks.network_mappings is defined %}
bridge_mappings = {{ neutron_provider_networks.network_mappings }} bridge_mappings = {{ neutron_provider_networks.network_mappings }}
{% endif %} {% endif %}
[agent] [agent]
l2_population = {{ neutron_plugins[neutron_plugin_type].l2_population }} l2_population = {{ neutron_plugins[neutron_plugin_type].l2_population }}
tunnel_types = gre,vxlan tunnel_types = {{ neutron_tunnel_types }}
# Security groups # Security groups
[securitygroup] [securitygroup]