]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
ifupdownmain: dont catch link_up and link_down errors in ifupdownmain
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Fri, 16 Sep 2016 18:29:27 +0000 (11:29 -0700)
committerRoopa Prabhu <roopa@cumulusnetworks.com>
Fri, 16 Sep 2016 18:29:27 +0000 (11:29 -0700)
Ticket: CM-12843
Reviewed By: julien, nikhil
Testing Done: Tested the failing test case in the bug

The scheduler already has some checking for errors from
link_up and link_down introduced by
commit 61c4d7244735 ("Suppress 'Network down' warnings when
link_master_slave feature is on").

The above fix was removed by a recent commit
707aeb737882 ("netlink ip link set up/down may silently fail, adding
try/except statements"). The scheduler does catch these errors.
so we will need to figure out why the scheduler is not catching it.
Right now this is failing an automation test. So the best fix
is to make sure the previous behaviour is restored.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
ifupdown/ifupdownmain.py

index f8d6cb867d48e1cd0dfaa2ea1b2837c540a44ecf..4d31cd972b8c2c0cd493d7267c54724267da5ccc 100644 (file)
@@ -129,11 +129,7 @@ class ifupdownMain(ifupdownBase):
             return
         if not self.link_exists(ifaceobj.name):
            return
-        try:
-            self.link_up(ifaceobj.name)
-        except Exception as e:
-            self.logger.error('%s: %s' % (ifaceobj.name, str(e)))
-            ifaceobj.set_status(ifaceStatus.ERROR)
+        self.link_up(ifaceobj.name)
 
     def run_down(self, ifaceobj):
         if ((ifaceobj.link_kind & ifaceLinkKind.VRF) or
@@ -157,11 +153,7 @@ class ifupdownMain(ifupdownBase):
            return
         if not self.link_exists(ifaceobj.name):
            return
-        try:
-            self.link_down(ifaceobj.name)
-        except Exception as e:
-            self.logger.error('%s: %s' % (ifaceobj.name, str(e)))
-            ifaceobj.set_status(ifaceStatus.ERROR)
+        self.link_down(ifaceobj.name)
 
     # ifupdown object interface operation handlers
     ops_handlers = OrderedDict([('up', run_up),