Comment 5 for bug 1931696

Revision history for this message
Trent Lloyd (lathiat) wrote :

This may have been a bad option to enable by default based on the notes from https://docs.openstack.org/releasenotes/neutron/queens.html and may be breaking dvr/l3ha in some cases, discussing with details in https://bugs.launchpad.net/neutron/+bug/1945306

Throwing in a copy of a patch I had lying around from another investigation to make this configurable instead. Not rocket science but stashing in case it's wanted later.

diff --git a/config.yaml b/config.yaml
index 764ddee..1018dff 100644
--- a/config.yaml
+++ b/config.yaml
@@ -457,3 +457,8 @@ options:
     description: |
       Allow the charm and packages to restart services automatically when
       required.
+ explicitly-egress-direct:
+ type: boolean
+ default: False
+ description: |
+ Set explicitly_egress_direct on neutron-openvswitch
diff --git a/hooks/neutron_ovs_context.py b/hooks/neutron_ovs_context.py
index 1c97eba..1ff0a9e 100644
--- a/hooks/neutron_ovs_context.py
+++ b/hooks/neutron_ovs_context.py
@@ -216,6 +216,8 @@ class OVSPluginContext(context.NeutronContext):
         ovs_ctxt['enable_dpdk'] = conf['enable-dpdk']
         ovs_ctxt['keepalived_healthcheck_interval'] = \
             conf['keepalived-healthcheck-interval']
+ ovs_ctxt['explicitly_egress_direct'] = conf['explicitly-egress-direct']
+
         ovs_ctxt['disable_mlockall'] = self.disable_mlockall()

         net_dev_mtu = neutron_api_settings.get('network_device_mtu')
diff --git a/templates/queens/openvswitch_agent.ini b/templates/queens/openvswitch_agent.ini
index 74ccefa..cd4a889 100644
--- a/templates/queens/openvswitch_agent.ini
+++ b/templates/queens/openvswitch_agent.ini
@@ -26,6 +26,9 @@ polling_interval = {{ polling_interval }}
 {% if extension_drivers -%}
 extensions = {{ extension_drivers }}
 {% endif -%}
+{% if explicitly_egress_direct -%}
+explicitly_egress_direct = {{ explicitly_egress_direct }}
+{% endif -%}

 [securitygroup]
 {% if neutron_security_groups and not enable_dpdk -%}
diff --git a/templates/ussuri/openvswitch_agent.ini b/templates/ussuri/openvswitch_agent.ini
index 2f42f50..cd4a889 100644
--- a/templates/ussuri/openvswitch_agent.ini
+++ b/templates/ussuri/openvswitch_agent.ini
@@ -26,8 +26,9 @@ polling_interval = {{ polling_interval }}
 {% if extension_drivers -%}
 extensions = {{ extension_drivers }}
 {% endif -%}
-# See LP 1931696
-explicitly_egress_direct = True
+{% if explicitly_egress_direct -%}
+explicitly_egress_direct = {{ explicitly_egress_direct }}
+{% endif -%}

 [securitygroup]
 {% if neutron_security_groups and not enable_dpdk -%}