Blob Blame History Raw
From 408da7ad8eaedf9edb8dfa240af35a222fa8b481 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Mon, 11 Mar 2019 13:29:04 +0100
Subject: [PATCH] Do not crash if 'dm.get_member_raid_sets' fails (#1684851)

---
 blivet/populator/helpers/dmraid.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/blivet/populator/helpers/dmraid.py b/blivet/populator/helpers/dmraid.py
index c8cc3a8e..ed48bd66 100644
--- a/blivet/populator/helpers/dmraid.py
+++ b/blivet/populator/helpers/dmraid.py
@@ -53,7 +53,12 @@ def run(self):
         minor = udev.device_get_minor(self.data)
 
         # Have we already created the DMRaidArrayDevice?
-        rs_names = blockdev.dm.get_member_raid_sets(name, uuid, major, minor)
+        try:
+            rs_names = blockdev.dm.get_member_raid_sets(name, uuid, major, minor)
+        except blockdev.DMError as e:
+            log.error("Failed to get RAID sets information for '%s': %s", name, str(e))
+            return
+
         if len(rs_names) == 0:
             log.warning("dmraid member %s does not appear to belong to any "
                         "array", self.device.name)