[PATCH 2/2] Raise an exception when we find orphan partitions.

David Lehman dlehman at redhat.com
Thu Oct 2 19:25:07 UTC 2014


If we find a partition that belongs on a disk that we did not find a
disklabel on (or a hidden format or an iso9660 fs) we have serious
enough problems to justify raising an exception instead of quietly
ignoring it. Ignoring these partitions almost always ends up causing
fatal problems further along.

Related: rhbz#1144410
---
 blivet/devicetree.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 6afc356..a0b4385 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -933,6 +933,10 @@ class DeviceTree(object):
             #  - devices that do not have a usable disklabel
             #  - devices that contain disklabels made by isohybrid
             #
+            if (disk.partitionable and not
+                (disk.format.type == "iso9660" or disk.format.hidden)):
+                raise DeviceTreeError("failed to scan disk %s" % disk.name)
+
             # there's no need to filter partitions on members of multipaths or
             # fwraid members from lvm since multipath and dmraid are already
             # active and lvm should therefore know to ignore them
-- 
1.9.3



More information about the anaconda-patches mailing list