]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
addons: bond: catch exception and log.info on modprobe failure
authorJulien Fortin <julien@cumulusnetworks.com>
Mon, 5 Nov 2018 19:15:09 +0000 (20:15 +0100)
committerJulien Fortin <julien@cumulusnetworks.com>
Thu, 13 Dec 2018 22:43:57 +0000 (14:43 -0800)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
ifupdown2/addons/bond.py

index 3650a10533f82256e2f999d25a58ee4f6c9b85d6..467c8ba07e1de62355dc1fa66b4de6aae7a961d3 100644 (file)
@@ -203,7 +203,10 @@ class bond(moduleBase):
         self.bondcmd = None
 
         if not os.path.exists('/sys/class/net/bonding_masters'):
-            utils.exec_command('modprobe -q bonding')
+            try:
+                utils.exec_command('modprobe -q bonding')
+            except Exception as e:
+                self.logger.info("bond: error while loading bonding module: %s" % str(e))
 
     @staticmethod
     def get_bond_slaves(ifaceobj):