Public n/w access for vxlan tenant n/w in ml2.ovs

Currently neutron role doesn't configure l3 agent (controller) for
external network connecitivity for the openstack tenant network.
This needs some manual configuration to provide public network
access for the tenant VMs. This review attempts to automate these
steps.

Change-Id: I653ee5136ac508c473cbdb761a00454a774a4336
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
This commit is contained in:
Periyasamy Palanisamy 2018-05-11 11:28:45 +02:00
parent 8f8f367662
commit 452a2b668b
3 changed files with 48 additions and 1 deletions

View File

@ -165,6 +165,16 @@ Set the following user variables in your
network_vlan_ranges: "physnet1:102:199" network_vlan_ranges: "physnet1:102:199"
network_mappings: "physnet1:br-provider" network_mappings: "physnet1:br-provider"
# When using Open vSwitch, Tenant network is of type vxlan and want
# to provide the external network connectivity over flat provider
# network, then configure neutron_provider_networks like following.
neutron_provider_networks:
network_flat_networks: "*"
network_types: "vxlan"
network_vxlan_ranges: "1:1000"
network_mappings: "provider:br-provider"
network_interface: eth12
Customization is needed to support additional network types such as vxlan, Customization is needed to support additional network types such as vxlan,
GRE or Geneve. Refer to the `neutron agent configuration GRE or Geneve. Refer to the `neutron agent configuration
<https://docs.openstack.org/neutron/latest/configuration/#configuration-reference>`_ for <https://docs.openstack.org/neutron/latest/configuration/#configuration-reference>`_ for

View File

@ -0,0 +1,34 @@
---
# Copyright 2018, Ericsson AB and Others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Setup External Network Provider Bridge
openvswitch_bridge:
bridge: "{{ neutron_provider_networks.network_mappings.split(':')[1] }}"
state: present
when:
- neutron_services['neutron-l3-agent']['group'] in group_names
- neutron_plugin_type == 'ml2.ovs'
- neutron_provider_networks.network_mappings is defined
- name: Add port to External Network Provider Bridge
openvswitch_port:
bridge: "{{ neutron_provider_networks.network_mappings.split(':')[1] }}"
port: "{{ neutron_provider_networks.network_interface }}"
state: present
when:
- neutron_services['neutron-l3-agent']['group'] in group_names
- neutron_plugin_type == 'ml2.ovs'
- neutron_provider_networks.network_mappings is defined
- neutron_provider_networks.network_interface is defined

View File

@ -4,7 +4,10 @@
{% if neutron_tunnel_types | length > 0 %} {% if neutron_tunnel_types | length > 0 %}
local_ip = {{ neutron_local_ip }} local_ip = {{ neutron_local_ip }}
{% endif %} {% endif %}
{% if neutron_provider_networks.network_mappings is defined and ((neutron_provider_networks.network_mappings | length) > 0) %} {% if neutron_plugin_type != 'ml2.ovs' and neutron_provider_networks.network_mappings is defined and ((neutron_provider_networks.network_mappings | length) > 0) %}
bridge_mappings = {{ neutron_provider_networks.network_mappings }}
{% endif %}
{% if neutron_services['neutron-l3-agent']['group'] in group_names and neutron_plugin_type == 'ml2.ovs' and neutron_provider_networks.network_mappings is defined and ((neutron_provider_networks.network_mappings | length) > 0) %}
bridge_mappings = {{ neutron_provider_networks.network_mappings }} bridge_mappings = {{ neutron_provider_networks.network_mappings }}
{% endif %} {% endif %}