From fa4ff64b86e6e1b6399f7250eadbee9775c22d32 Mon Sep 17 00:00:00 2001 From: Sahid Orentino Ferdjaoui Date: Wed, 6 Sep 2017 03:35:58 -0400 Subject: [PATCH] ovs-hybrid: should permanently keep MAC entries The linux bridge installed for the particular vif type ovs-hybrid should be configured to persistently keep the MAC learned from the RARP packets sent by QEMU when starting on destination node. That to avoid any break of the datapath during a live-migration. That because at some point of the live-migration source and destination can be on a same L2 and we could have the destination bridge learning from source. Change-Id: I50775df3629a079e6ba6f167ebfa499ffa5c7cac Closes-Bug: 1715317 Related-Bug: 1414559 --- vif_plug_ovs/linux_net.py | 1 + vif_plug_ovs/tests/unit/test_linux_net.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/vif_plug_ovs/linux_net.py b/vif_plug_ovs/linux_net.py index 4039b741..8816127b 100644 --- a/vif_plug_ovs/linux_net.py +++ b/vif_plug_ovs/linux_net.py @@ -153,6 +153,7 @@ def ensure_bridge(bridge): processutils.execute('brctl', 'addbr', bridge) processutils.execute('brctl', 'setfd', bridge, 0) processutils.execute('brctl', 'stp', bridge, 'off') + processutils.execute('brctl', 'setageing', bridge, 0) syspath = '/sys/class/net/%s/bridge/multicast_snooping' syspath = syspath % bridge processutils.execute('tee', syspath, process_input='0', diff --git a/vif_plug_ovs/tests/unit/test_linux_net.py b/vif_plug_ovs/tests/unit/test_linux_net.py index b097ca43..16f4849b 100644 --- a/vif_plug_ovs/tests/unit/test_linux_net.py +++ b/vif_plug_ovs/tests/unit/test_linux_net.py @@ -51,6 +51,7 @@ class LinuxNetTest(testtools.TestCase): mock.call('brctl', 'addbr', 'br0'), mock.call('brctl', 'setfd', 'br0', 0), mock.call('brctl', 'stp', 'br0', "off"), + mock.call('brctl', 'setageing', 'br0', 0), mock.call('tee', '/sys/class/net/br0/bridge/multicast_snooping', check_exit_code=[0, 1], process_input='0'), mock.call('ip', 'link', 'set', 'br0', 'up', @@ -70,6 +71,7 @@ class LinuxNetTest(testtools.TestCase): mock.call('brctl', 'addbr', 'br0'), mock.call('brctl', 'setfd', 'br0', 0), mock.call('brctl', 'stp', 'br0', "off"), + mock.call('brctl', 'setageing', 'br0', 0), mock.call('tee', '/sys/class/net/br0/bridge/multicast_snooping', check_exit_code=[0, 1], process_input='0'), mock.call('tee', '/proc/sys/net/ipv6/conf/br0/disable_ipv6',