62e56e
From 408da7ad8eaedf9edb8dfa240af35a222fa8b481 Mon Sep 17 00:00:00 2001
62e56e
From: Vojtech Trefny <vtrefny@redhat.com>
62e56e
Date: Mon, 11 Mar 2019 13:29:04 +0100
62e56e
Subject: [PATCH] Do not crash if 'dm.get_member_raid_sets' fails (#1684851)
62e56e
62e56e
---
62e56e
 blivet/populator/helpers/dmraid.py | 7 ++++++-
62e56e
 1 file changed, 6 insertions(+), 1 deletion(-)
62e56e
62e56e
diff --git a/blivet/populator/helpers/dmraid.py b/blivet/populator/helpers/dmraid.py
62e56e
index c8cc3a8e..ed48bd66 100644
62e56e
--- a/blivet/populator/helpers/dmraid.py
62e56e
+++ b/blivet/populator/helpers/dmraid.py
62e56e
@@ -53,7 +53,12 @@ def run(self):
62e56e
         minor = udev.device_get_minor(self.data)
62e56e
 
62e56e
         # Have we already created the DMRaidArrayDevice?
62e56e
-        rs_names = blockdev.dm.get_member_raid_sets(name, uuid, major, minor)
62e56e
+        try:
62e56e
+            rs_names = blockdev.dm.get_member_raid_sets(name, uuid, major, minor)
62e56e
+        except blockdev.DMError as e:
62e56e
+            log.error("Failed to get RAID sets information for '%s': %s", name, str(e))
62e56e
+            return
62e56e
+
62e56e
         if len(rs_names) == 0:
62e56e
             log.warning("dmraid member %s does not appear to belong to any "
62e56e
                         "array", self.device.name)