From d5a7c59f4e897156179cef980a2fb3db621f1a1a Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Fri, 25 Mar 2022 23:20:57 +0000 Subject: [PATCH] Remove sub-ints before VXLANs. Report on interfaces thare are deleted before their addresses are. --- vpp/reconciler.py | 6 +++--- vpp/vppapi.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vpp/reconciler.py b/vpp/reconciler.py index c317399..2b074e7 100644 --- a/vpp/reconciler.py +++ b/vpp/reconciler.py @@ -66,12 +66,12 @@ class Reconciler(): if not self.prune_l2xcs(): self.logger.warning("Could not prune L2 Cross Connects from VPP") ret = False - if not self.prune_vxlan_tunnels(): - self.logger.warning("Could not prune VXLAN Tunnels from VPP") - ret = False if not self.prune_sub_interfaces(): self.logger.warning("Could not prune sub-interfaces from VPP") ret = False + if not self.prune_vxlan_tunnels(): + self.logger.warning("Could not prune VXLAN Tunnels from VPP") + ret = False if not self.prune_bondethernets(): self.logger.warning("Could not prune BondEthernets from VPP") ret = False diff --git a/vpp/vppapi.py b/vpp/vppapi.py index ba4c627..272cf55 100644 --- a/vpp/vppapi.py +++ b/vpp/vppapi.py @@ -121,6 +121,8 @@ class VPPApi(): iface = self.config['interface_names'][ifname] del self.config['interfaces'][iface.sw_if_index] + if len(self.config['interface_addresses'][iface.sw_if_index]) > 0: + self.logger.warning("Not all addresses were removed on %s" % ifname) del self.config['interface_addresses'][iface.sw_if_index] del self.config['interface_names'][ifname]