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

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

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
 pyanaconda/storage/devicetree.py |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 455450c..651b848 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -1305,7 +1305,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)
@@ -1380,11 +1381,6 @@ class DeviceTree(object):
                                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",

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