From fce93c54deb27a277ed2577e72edfe4eebde9f4c Mon Sep 17 00:00:00 2001 From: Balakrishnan Raman Date: Tue, 6 Jan 2015 21:16:39 -0800 Subject: [PATCH] Fix BCM SDK tunnel termination object cleanup on vxlan tunnel delete Ticket: CM-4723 Reviewed By: CCR-2408 Testing Done: vxlan_fld_test.py:test_bond_vxlinux_convergence_flaps, manual testing On tunnel delete, tunnel termination object in BCM sdk is not cleaned properly. As a result, mpls_entry in the hardware is left around even though software has deleted the tunnel. This prevents subsequent dynamic creation of the same tunnel and also mac learning, as mpls_entry points to invalid SVP with no CML setting to do hardware learning. Also, changes in ifupdown2 to make "vxlan-learning on" as default, so that user/script doesn't have to explicitly turn on the learning. --- addons/vxlan.py | 3 ++- ifupdownaddons/iproute2.py | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/vxlan.py b/addons/vxlan.py index 8d87b2f..3493329 100644 --- a/addons/vxlan.py +++ b/addons/vxlan.py @@ -25,7 +25,8 @@ class vxlan(moduleBase): 'example': ['vxlan-peernodeip 172.16.22.127']}, 'vxlan-learning' : {'help' : 'vxlan learning on/off', - 'example': ['vxlan-learning on']}, + 'example': ['vxlan-learning on'], + 'default': 'on'}, }} def __init__(self, *args, **kargs): diff --git a/ifupdownaddons/iproute2.py b/ifupdownaddons/iproute2.py index 90a9dc0..fca2a8e 100644 --- a/ifupdownaddons/iproute2.py +++ b/ifupdownaddons/iproute2.py @@ -460,7 +460,7 @@ class iproute2(utilsBase): localtunnelip=None, svcnodeips=None, peernodeips=None, - learning='off'): + learning='on'): if svcnodeips and peernodeips: raise Exception("svcnodeip and peernodeip is mutually exclusive") args = '' @@ -472,9 +472,7 @@ class iproute2(utilsBase): if peernodeips: for s in peernodeips: args += ' peernode %s' %s - if learning == 'on': - args += ' learning' - else: + if learning == 'off': args += ' nolearning' if self.link_exists(name):