L3 Support for ODL deployments

The current ODL deployment does not correctly support L3 when ODL implements
the L3 logic (instead of using neutron-L3-agent)

Note that the neutron_plugin_base variable is a list with the neutron plugins
to be used and it is read by neutron.conf to list them. If this variable has
odl-router or odl-router_v2, neutron will delegate the routing logic to ODL
and will not start neutron-L3-agent.

Change-Id: I819e566c192ab1a00736f0aa9d7d04939f84f66d
This commit is contained in:
Manuel Buil 2017-08-24 16:56:58 +02:00
parent 4d820ac942
commit c783f0851e
3 changed files with 36 additions and 2 deletions

View File

@ -18,7 +18,7 @@ reading that scenario to get some background. It is also recommended to be
familiar with OpenDaylight and networking-odl projects and their configuration.
* `Scenario: Open vSwitch <app-openvswitch.html>`_
* `OpenDaylight SDN Controller <docs.opendaylight.org/en/latest/>`_
* `OpenDaylight SDN Controller <http://docs.opendaylight.org/en/latest/>`_
* `Networking-odl <https://github.com/openstack/networking-odl>`_
Prerequisites
@ -80,6 +80,30 @@ of feature names in the ``opendaylight_extra_features`` variable.
For more information, see OpenDaylight Ansible role documentation.
L3 configuration
~~~~~~~~~~~~~~~~
L3 services are by default provided by the neutron-l3-agent. ODL is capable of
providing L3 services too and if ODL is deployed, it is actually recommended to
use them instead of neutron. Remember that L3 services allow, among other
things, to give VMs connectivity to the internet.
To activate the ODL L3 services, you should add to the above explained
variables:
.. code-block:: yaml
# Activate the L3 capabilities of ODL
neutron_plugin_base:
- odl-router_v2
- metering
If you want to use the L3 capabilities, you will need to define a external
Neutron network and set a gateway. Note that the br-vlan interface of the nodes
could be a perfect interface for that gateway, although it depends on your
network topology.
Security information
~~~~~~~~~~~~~~~~~~~~

View File

@ -47,7 +47,7 @@
when: ovs_manager.stdout == ""
- name: Configure hosts for networking-odl, force kernel datapath
command: "{{ neutron_bin }}/neutron-odl-ovs-hostconfig --noovs_dpdk"
command: "{{ neutron_bin }}/neutron-odl-ovs-hostconfig --noovs_dpdk {% if 'odl-router' in neutron_plugin_base %}--datapath_type=system --bridge_mappings={{ neutron_provider_networks.network_mappings }}"
when: ovs_manager.stdout == ""
- name: Retrieve current OvS local ip
@ -59,3 +59,9 @@
- name: Set local ip for OpenvSwitch
command: "ovs-vsctl set Open_vSwitch . other_config:local_ip={{ neutron_local_ip }}"
when: ovs_local_ip.rc != 0
- name: Set the bridge mappings
command: "ovs-vsctl set Open_vSwitch . other_config:provider_mappings={{ neutron_provider_networks.network_mappings }}"
when:
- neutron_provider_networks.network_mappings is defined
- (neutron_plugin_base == 'odl-router' or neutron_plugin_base == 'odl-router_v2')

View File

@ -7,6 +7,10 @@ tenant_network_types = {{ neutron_provider_networks.network_types if neutron_pro
mechanism_drivers = {{ neutron_ml2_mechanism_drivers }}
extension_drivers = port_security{% if 'qos' in neutron_plugin_base %},qos{% endif %}{% if 'dns' in neutron_plugin_base %},dns{% endif %}
{% if neutron_plugin_type == 'ml2.opendaylight' and 'odl-router' in neutron_plugin_base %}
bridge_mappings = {{ neutron_provider_networks.network_mappings }}
{% endif %}
{% if neutron_provider_networks.network_flat_networks is defined %}
# ML2 flat networks