From 9d332765e55bad04de83de32b3e750c6df28ba39 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Fri, 2 Aug 2019 11:55:46 +0000 Subject: [PATCH] Revert "Stop using veth pairs to connect qdhcp ns" Reverting as this change causes existing qdhcp namespaces to become inaccessible. This reverts commit bbc20dbe49e13fc2166cfae3a10eff57cad56553. Change-Id: I91ec8b34bd531e48d00c48512a43921f97b6d9a2 --- templates/icehouse/dhcp_agent.ini | 3 ++- templates/icehouse/l3_agent.ini | 4 +++- templates/juno/l3_agent.ini | 4 +++- templates/mitaka/dhcp_agent.ini | 3 ++- templates/mitaka/l3_agent.ini | 4 +++- templates/newton/l3_agent.ini | 4 +++- templates/queens/l3_agent.ini | 4 +++- templates/stein/l3_agent.ini | 4 +++- tests/basic_deployment.py | 4 ++++ 9 files changed, 26 insertions(+), 8 deletions(-) diff --git a/templates/icehouse/dhcp_agent.ini b/templates/icehouse/dhcp_agent.ini index 4fe46e8f..ff1ff906 100644 --- a/templates/icehouse/dhcp_agent.ini +++ b/templates/icehouse/dhcp_agent.ini @@ -17,11 +17,12 @@ enable_metadata_network = True enable_isolated_metadata = True {% endif -%} -ovs_use_veth = False {% if plugin == 'n1kv' %} enable_metadata_network = True enable_isolated_metadata = True resync_interval = 30 use_namespaces = True dhcp_lease_time=3600 +{% else %} +ovs_use_veth = True {% endif %} diff --git a/templates/icehouse/l3_agent.ini b/templates/icehouse/l3_agent.ini index 2a59a467..0f5de24e 100644 --- a/templates/icehouse/l3_agent.ini +++ b/templates/icehouse/l3_agent.ini @@ -11,11 +11,13 @@ admin_user = {{ service_username }} admin_password = {{ service_password }} root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf handle_internal_only_routers = {{ handle_internal_only_router }} -ovs_use_veth = False {% if plugin == 'n1kv' %} l3_agent_manager = neutron.agent.l3_agent.L3NATAgentWithStateReport external_network_bridge = br-int +ovs_use_veth = False use_namespaces = True +{% else %} +ovs_use_veth = True {% endif %} {% if external_configuration_new -%} gateway_external_network_id = diff --git a/templates/juno/l3_agent.ini b/templates/juno/l3_agent.ini index 997a9a93..6376978b 100644 --- a/templates/juno/l3_agent.ini +++ b/templates/juno/l3_agent.ini @@ -11,11 +11,13 @@ admin_user = {{ service_username }} admin_password = {{ service_password }} root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf handle_internal_only_routers = {{ handle_internal_only_router }} -ovs_use_veth = False {% if plugin == 'n1kv' %} l3_agent_manager = neutron.agent.l3_agent.L3NATAgentWithStateReport external_network_bridge = br-int +ovs_use_veth = False use_namespaces = True +{% else %} +ovs_use_veth = True {% endif %} {% if external_configuration_new -%} gateway_external_network_id = diff --git a/templates/mitaka/dhcp_agent.ini b/templates/mitaka/dhcp_agent.ini index fc11c1c7..b70d74c5 100644 --- a/templates/mitaka/dhcp_agent.ini +++ b/templates/mitaka/dhcp_agent.ini @@ -28,9 +28,10 @@ dhcp_domain = {{ dns_domain }} enable_metadata_network = {{ enable_metadata_network }} enable_isolated_metadata = {{ enable_isolated_metadata }} -ovs_use_veth = False {% if plugin == 'n1kv' %} resync_interval = 30 use_namespaces = True dhcp_lease_time=3600 +{% else %} +ovs_use_veth = True {% endif %} diff --git a/templates/mitaka/l3_agent.ini b/templates/mitaka/l3_agent.ini index 23b379bd..2342e869 100644 --- a/templates/mitaka/l3_agent.ini +++ b/templates/mitaka/l3_agent.ini @@ -11,11 +11,13 @@ admin_user = {{ service_username }} admin_password = {{ service_password }} root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf handle_internal_only_routers = {{ handle_internal_only_router }} -ovs_use_veth = False {% if plugin == 'n1kv' %} l3_agent_manager = neutron.agent.l3_agent.L3NATAgentWithStateReport external_network_bridge = br-int +ovs_use_veth = False use_namespaces = True +{% else %} +ovs_use_veth = True {% endif %} {% if external_configuration_new -%} gateway_external_network_id = diff --git a/templates/newton/l3_agent.ini b/templates/newton/l3_agent.ini index 18f1ae0d..4ff0c2cc 100644 --- a/templates/newton/l3_agent.ini +++ b/templates/newton/l3_agent.ini @@ -12,11 +12,13 @@ admin_user = {{ service_username }} admin_password = {{ service_password }} root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf handle_internal_only_routers = {{ handle_internal_only_router }} -ovs_use_veth = False {% if plugin == 'n1kv' %} l3_agent_manager = neutron.agent.l3_agent.L3NATAgentWithStateReport external_network_bridge = br-int +ovs_use_veth = False use_namespaces = True +{% else %} +ovs_use_veth = True {% endif %} {% if external_configuration_new -%} gateway_external_network_id = diff --git a/templates/queens/l3_agent.ini b/templates/queens/l3_agent.ini index 68b64ad5..d5e003e3 100644 --- a/templates/queens/l3_agent.ini +++ b/templates/queens/l3_agent.ini @@ -7,11 +7,13 @@ interface_driver = openvswitch root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf handle_internal_only_routers = {{ handle_internal_only_router }} -ovs_use_veth = False {% if plugin == 'n1kv' %} l3_agent_manager = neutron.agent.l3_agent.L3NATAgentWithStateReport external_network_bridge = br-int +ovs_use_veth = False use_namespaces = True +{% else %} +ovs_use_veth = True {% endif %} {% if external_configuration_new -%} gateway_external_network_id = diff --git a/templates/stein/l3_agent.ini b/templates/stein/l3_agent.ini index 4fcec16e..78fee431 100644 --- a/templates/stein/l3_agent.ini +++ b/templates/stein/l3_agent.ini @@ -7,11 +7,13 @@ interface_driver = openvswitch root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf handle_internal_only_routers = {{ handle_internal_only_router }} -ovs_use_veth = False {% if plugin == 'n1kv' %} l3_agent_manager = neutron.agent.l3_agent.L3NATAgentWithStateReport external_network_bridge = br-int +ovs_use_veth = False use_namespaces = True +{% else %} +ovs_use_veth = True {% endif %} {% if external_configuration_new -%} gateway_external_network_id = diff --git a/tests/basic_deployment.py b/tests/basic_deployment.py index d3a30449..c46987ad 100644 --- a/tests/basic_deployment.py +++ b/tests/basic_deployment.py @@ -562,6 +562,7 @@ class NeutronGatewayBasicDeployment(OpenStackAmuletDeployment): 'dhcp_driver': 'neutron.agent.linux.dhcp.Dnsmasq', 'root_helper': 'sudo /usr/bin/neutron-rootwrap ' '/etc/neutron/rootwrap.conf', + 'ovs_use_veth': 'True' } section = 'DEFAULT' @@ -622,6 +623,7 @@ class NeutronGatewayBasicDeployment(OpenStackAmuletDeployment): 'interface_driver': interface_driver, 'root_helper': 'sudo /usr/bin/neutron-rootwrap ' '/etc/neutron/rootwrap.conf', + 'ovs_use_veth': 'True', 'handle_internal_only_routers': 'True' } section = 'DEFAULT' @@ -649,6 +651,7 @@ class NeutronGatewayBasicDeployment(OpenStackAmuletDeployment): 'DEFAULT': { 'interface_driver': interface_driver, 'periodic_interval': '10', + 'ovs_use_veth': 'False', }, 'haproxy': { 'loadbalancer_state_path': '$state_path/lbaas', @@ -661,6 +664,7 @@ class NeutronGatewayBasicDeployment(OpenStackAmuletDeployment): ('neutron_lbaas.drivers.haproxy.namespace_driver.' 'HaproxyNSDriver') expected['DEFAULT'].pop('periodic_interval') + expected['DEFAULT'].pop('ovs_use_veth') elif self._get_openstack_release() >= self.trusty_kilo: expected['DEFAULT']['device_driver'] = \ ('neutron_lbaas.services.loadbalancer.drivers.haproxy.'