mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
nlcache: link_del: move log.info after get_ifindex check
if the link doesn't exists get_ifindex will raise an exception new code in the bridge module simply call link_del on a dummy port that may not exists. It was a bit confusing to see the log.info stating that a port was getting removed... Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@@ -2553,9 +2553,11 @@ class NetlinkListenerWithCache(nllistener.NetlinkManagerWithListener, BaseObject
|
||||
:param ifname:
|
||||
:return:
|
||||
"""
|
||||
self.logger.info("%s: netlink: ip link del %s" % (ifname, ifname))
|
||||
try:
|
||||
ifindex = self.cache.get_ifindex(ifname)
|
||||
|
||||
self.logger.info("%s: netlink: ip link del %s" % (ifname, ifname))
|
||||
|
||||
debug = RTM_DELLINK in self.debug
|
||||
|
||||
link = Link(RTM_DELLINK, debug, use_color=self.use_color)
|
||||
|
Reference in New Issue
Block a user