Allow Neutron to be run in DVR mode

Introduces a new property "enable_neutron_dvr", along with the
appropriate service and template changes to allow DVR.

Closes-Bug: #1623463
DocImpact: dvr changes network data paths and adds requirements for NICs
Co-Authored-By: Vladislav Belogrudov <vladislav.belogrudov@oracle.com>
Change-Id: I87a26e9258228ae2ccb76be1e5f0bb44fac128df
This commit is contained in:
Paul Bourke 2016-08-17 15:12:48 +00:00
parent afe4209bb2
commit 95c916aa5e
8 changed files with 38 additions and 6 deletions

View File

@ -254,6 +254,7 @@ enable_mistral: "no"
enable_mongodb: "no" enable_mongodb: "no"
enable_multipathd: "no" enable_multipathd: "no"
enable_murano: "no" enable_murano: "no"
enable_neutron_dvr: "no"
enable_neutron_lbaas: "no" enable_neutron_lbaas: "no"
enable_neutron_qos: "no" enable_neutron_qos: "no"
enable_neutron_agent_ha: "no" enable_neutron_agent_ha: "no"

View File

@ -12,8 +12,10 @@
- { name: neutron_server, group: neutron-server } - { name: neutron_server, group: neutron-server }
- { name: neutron_dhcp_agent, group: neutron-dhcp-agent } - { name: neutron_dhcp_agent, group: neutron-dhcp-agent }
- { name: neutron_l3_agent, group: neutron-l3-agent } - { name: neutron_l3_agent, group: neutron-l3-agent }
- { name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
- { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" } - { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }
- { name: neutron_metadata_agent, group: neutron-metadata-agent } - { name: neutron_metadata_agent, group: neutron-metadata-agent }
- { name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
- name: Ensuring the neutron_openvswitch_agent container is up - name: Ensuring the neutron_openvswitch_agent container is up
kolla_docker: kolla_docker:
@ -69,8 +71,10 @@
- { name: neutron_server, group: neutron-server } - { name: neutron_server, group: neutron-server }
- { name: neutron_dhcp_agent, group: neutron-dhcp-agent } - { name: neutron_dhcp_agent, group: neutron-dhcp-agent }
- { name: neutron_l3_agent, group: neutron-l3-agent } - { name: neutron_l3_agent, group: neutron-l3-agent }
- { name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
- { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" } - { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }
- { name: neutron_metadata_agent, group: neutron-metadata-agent } - { name: neutron_metadata_agent, group: neutron-metadata-agent }
- { name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
- name: Check the configs in the neutron_openvswitch_agent container - name: Check the configs in the neutron_openvswitch_agent container
command: docker exec neutron_openvswitch_agent /usr/local/bin/kolla_set_configs --check command: docker exec neutron_openvswitch_agent /usr/local/bin/kolla_set_configs --check
@ -125,8 +129,10 @@
- { name: neutron_server, group: neutron-server } - { name: neutron_server, group: neutron-server }
- { name: neutron_dhcp_agent, group: neutron-dhcp-agent } - { name: neutron_dhcp_agent, group: neutron-dhcp-agent }
- { name: neutron_l3_agent, group: neutron-l3-agent } - { name: neutron_l3_agent, group: neutron-l3-agent }
- { name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
- { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" } - { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }
- { name: neutron_metadata_agent, group: neutron-metadata-agent } - { name: neutron_metadata_agent, group: neutron-metadata-agent }
- { name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }
- name: Container config strategy for the neutron_openvswitch_agent container - name: Container config strategy for the neutron_openvswitch_agent container
kolla_docker: kolla_docker:
@ -180,8 +186,10 @@
- [{ name: neutron_server, group: neutron-server }, - [{ name: neutron_server, group: neutron-server },
{ name: neutron_dhcp_agent, group: neutron-dhcp-agent }, { name: neutron_dhcp_agent, group: neutron-dhcp-agent },
{ name: neutron_l3_agent, group: neutron-l3-agent }, { name: neutron_l3_agent, group: neutron-l3-agent },
{ name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" },
{ name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }, { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" },
{ name: neutron_metadata_agent, group: neutron-metadata-agent }] { name: neutron_metadata_agent, group: neutron-metadata-agent },
{ name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }]
- "{{ neutron_container_envs.results }}" - "{{ neutron_container_envs.results }}"
- "{{ neutron_check_results.results }}" - "{{ neutron_check_results.results }}"
@ -246,8 +254,10 @@
- [{ name: neutron_server, group: neutron-server }, - [{ name: neutron_server, group: neutron-server },
{ name: neutron_dhcp_agent, group: neutron-dhcp-agent }, { name: neutron_dhcp_agent, group: neutron-dhcp-agent },
{ name: neutron_l3_agent, group: neutron-l3-agent }, { name: neutron_l3_agent, group: neutron-l3-agent },
{ name: neutron_l3_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" },
{ name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" }, { name: neutron_lbaas_agent, group: neutron-lbaas-agent, enabled: "{{ enable_neutron_lbaas | bool }}" },
{ name: neutron_metadata_agent, group: neutron-metadata-agent }] { name: neutron_metadata_agent, group: neutron-metadata-agent },
{ name: neutron_metadata_agent, group: compute, enabled: "{{ enable_neutron_dvr | bool }}" }]
- "{{ neutron_container_envs.results }}" - "{{ neutron_container_envs.results }}"
- "{{ neutron_check_results.results }}" - "{{ neutron_check_results.results }}"

View File

@ -185,7 +185,8 @@
- "neutron_metadata_socket:/var/lib/neutron/kolla/" - "neutron_metadata_socket:/var/lib/neutron/kolla/"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
when: when:
- inventory_hostname in groups['neutron-l3-agent'] - (inventory_hostname in groups['neutron-l3-agent']
or (inventory_hostname in groups['compute'] and enable_neutron_dvr | bool))
- name: Starting neutron-lbaas-agent container - name: Starting neutron-lbaas-agent container
kolla_docker: kolla_docker:
@ -219,4 +220,5 @@
- "neutron_metadata_socket:/var/lib/neutron/kolla/" - "neutron_metadata_socket:/var/lib/neutron/kolla/"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
when: when:
- inventory_hostname in groups['neutron-metadata-agent'] - (inventory_hostname in groups['neutron-metadata-agent']
or (inventory_hostname in groups['compute'] and enable_neutron_dvr | bool))

View File

@ -1,4 +1,12 @@
# l3_agent.ini # l3_agent.ini
[DEFAULT] [DEFAULT]
{% if enable_neutron_dvr | bool %}
{% if inventory_hostname in groups['network'] %}
agent_mode = dvr_snat
{% elif inventory_hostname in groups['compute'] %}
agent_mode = dvr
{% endif %}
{% else %}
agent_mode = legacy agent_mode = legacy
{% endif %}
external_network_bridge = external_network_bridge =

View File

@ -50,6 +50,10 @@ tunnel_types = vxlan
l2_population = true l2_population = true
arp_responder = true arp_responder = true
{% if enable_neutron_dvr | bool %}
enable_distributed_routing = True
{% endif %}
[ovs] [ovs]
bridge_mappings = physnet1:{{ neutron_bridge_name }} bridge_mappings = physnet1:{{ neutron_bridge_name }}
ovsdb_connection = tcp:{{ api_interface_address }}:6640 ovsdb_connection = tcp:{{ api_interface_address }}:6640

View File

@ -46,13 +46,15 @@ min_l3_agents_per_router = {{ min_l3_agents_per_router }}
transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{% if orchestration_engine == 'KUBERNETES' %}rabbitmq{% else %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}{% endif %}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %} transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{% if orchestration_engine == 'KUBERNETES' %}rabbitmq{% else %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}{% endif %}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% if enable_neutron_dvr | bool %}
router_distributed = True
{% endif %}
{% if enable_neutron_lbaas | bool %} {% if enable_neutron_lbaas | bool %}
[service_providers] [service_providers]
service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
{% endif %} {% endif %}
transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{% if orchestration_engine == 'KUBERNETES' %}rabbitmq{% else %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}{% endif %}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
[nova] [nova]
auth_url = {{ keystone_admin_url }} auth_url = {{ keystone_admin_url }}
auth_type = password auth_type = password

View File

@ -131,6 +131,7 @@ kolla_internal_vip_address: "10.10.10.254"
#enable_mongodb: "no" #enable_mongodb: "no"
#enable_murano: "no" #enable_murano: "no"
#enable_multipathd: "no" #enable_multipathd: "no"
#enable_neutron_dvr: "no"
#enable_neutron_lbaas: "no" #enable_neutron_lbaas: "no"
#enable_neutron_qos: "no" #enable_neutron_qos: "no"
#enable_neutron_agent_ha: "no" #enable_neutron_agent_ha: "no"

View File

@ -0,0 +1,4 @@
---
features:
- Introduce a new property "enable_neutron_dvr".
Set to "yes" to deploy Neutron with DVR.