[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 3/3] Do disklabel handling for whole disk formats unknown to anaconda (#619721)



From: Hans de Goede <hdegoede redhat com>

Currently handleUdevDiskLabelFormat() skips disklabel handling if blkid
has found some sort of whole disk format, even when the type of whole disk
format is unknown to anaconda.

This seems wrong, and it causes bug 619721, which is about Firmware RAID
member disks being seen as a disk with an unknown whole disk format, rather
then a partitioned disk when anaconda is told to ignore Firmware RAID
metadata through the nodmraid cmdline option.

This patch also removes a similar check further down in
handleUdevDiskLabelFormat() which checks for the same thing, and thus is
redundant.
---
 storage/devicetree.py |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 1f0c391..9b92d9c 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1341,7 +1341,8 @@ class DeviceTree(object):
 
     def handleUdevDiskLabelFormat(self, info, device):
         log_method_call(self, device=device.name)
-        if udev_device_get_format(info):
+        # if there is preexisting formatting on the device use it
+        if getFormat(udev_device_get_format(info)).type is not None:
             log.debug("device %s does not contain a disklabel" % device.name)
             return
 
@@ -1416,11 +1417,6 @@ class DeviceTree(object):
                                device=device.path,
                                exists=not initlabel)
         except InvalidDiskLabelError:
-            # if there is preexisting formatting on the device we will
-            # use it instead of ignoring the device
-            if not self.zeroMbr and \
-               getFormat(udev_device_get_format(info)).type is not None:
-                return
             # if we have a cb function use it. else we ignore the device.
             if initcb is not None and initcb():
                 format = getFormat("disklabel",
-- 
1.7.2.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]