mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
netlink ip link set up/down may silently fail, adding try/except statements
Ticket: CM-12609 Reviewed By: Roopa, Nikhil G Testing Done: ifupdown2 smoke tests Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@@ -146,7 +146,10 @@ class vlan(moduleBase):
|
||||
netlink.link_add_vlan(vlanrawdevice, ifaceobj.name, vlanid)
|
||||
self._bridge_vid_add_del(ifaceobj, vlanrawdevice, vlanid)
|
||||
if ifaceobj.addr_method == 'manual':
|
||||
netlink.link_set_updown(ifaceobj.name, "up")
|
||||
try:
|
||||
netlink.link_set_updown(ifaceobj.name, "up")
|
||||
except Exception as e:
|
||||
self.log_error('%s: %s' % (ifaceobj.name, str(e)), ifaceobj)
|
||||
|
||||
def _down(self, ifaceobj):
|
||||
vlanid = self._get_vlan_id(ifaceobj)
|
||||
|
Reference in New Issue
Block a user