summaryrefslogtreecommitdiff
path: root/neutron
diff options
context:
space:
mode:
authorAnthony Timmins <atimmins@datto.com>2021-05-27 16:11:04 -0400
committerAnthony Timmins <atimmins@datto.com>2021-06-01 11:02:21 -0400
commit4cd11f4dee494c5851318410c523dfcfbce4c824 (patch)
tree18d86e74f8f30a67f8833212da70f304d5c66ff9 /neutron
parent5a6f61af4a438433f669e2c57bb152fc4ae8f3a9 (diff)
downloadneutron-4cd11f4dee494c5851318410c523dfcfbce4c824.tar.gz
Use local and ip address to create vxlan interface
Attempting to terminate a vxlan on the lo interface with multiple ip addresses fails. This seems to be because only the first ip address on the interface is used. If this address is invalid for vxlan creation (ie. 127.0.0.1), the vxlan interface will be created, but will not have a source ip address, and will therefore be non-functional. To remedy this issue, when L2population is used, we can set the local argument to the local_ip, thus ensuring the intended ip address is configured. Closes-Bug: 1929998 Change-Id: I9c54a268fc4ef9705637556ecba161bd6523a047 Signed-off-by: Anthony Timmins <atimmins@datto.com>
Diffstat (limited to 'neutron')
-rw-r--r--neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py4
-rw-r--r--neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py1
2 files changed, 5 insertions, 0 deletions
diff --git a/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py b/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py
index 92a243e6b0..e05b404a9c 100644
--- a/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py
+++ b/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py
@@ -346,8 +346,12 @@ class LinuxBridgeManager(amb.CommonAgentManagerBase):
if self.vxlan_mode == lconst.VXLAN_MCAST:
args['group'] = self.get_vxlan_group(segmentation_id)
+
if cfg.CONF.VXLAN.l2_population:
args['proxy'] = cfg.CONF.VXLAN.arp_responder
+ # L2population should set the local ip address to handle
+ # a source dev with multiple ip addresses configured.
+ args['local'] = self.local_ip
try:
int_vxlan = self.ip.add_vxlan(interface, segmentation_id,
diff --git a/neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py b/neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py
index 4e6747014c..9c330c41e3 100644
--- a/neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py
+++ b/neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py
@@ -412,6 +412,7 @@ class TestLinuxBridgeManager(base.BaseTestCase):
dstport=None,
ttl=None,
dev=self.lbm.local_int,
+ local=self.lbm.local_ip,
proxy=expected_proxy)
def test_ensure_vxlan_arp_responder_enabled(self):