[master 1/1] warn on failure to scan partitions

larsks installerbot-noreply at redhat.com
Thu Sep 17 13:51:45 UTC 2015


From: Lars Kellogg-Stedman <lars at redhat.com>

I had a Fedora install fail due to https://bugzilla.redhat.com/1263832,
and I wonder if we should be treating failures at this point in the code
as warnings rather than errors.  This would permit blivet to continue
scanning other devices.

This would seem to be in line with the comments at the beginning of this
section of code, which suggest that the desired behavior is to ignore
the device rather than throwing an exception:

    # Ignore partitions on:
    #  - devices we do not support partitioning of, like logical volumes
    #  - devices that do not have a usable disklabel
    #  - devices that contain disklabels made by isohybrid
---
 blivet/populator.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/blivet/populator.py b/blivet/populator.py
index 81ae73e..70c9f2b 100644
--- a/blivet/populator.py
+++ b/blivet/populator.py
@@ -441,12 +441,11 @@ def addUdevPartitionDevice(self, info, disk=None):
                not self._isIgnoredDisk(disk):
                 if info.get("ID_PART_TABLE_TYPE") == "gpt":
                     msg = "corrupt gpt disklabel on disk %s" % disk.name
-                    cls = CorruptGPTError
                 else:
                     msg = "failed to scan disk %s" % disk.name
-                    cls = DiskLabelScanError
 
-                raise cls(msg)
+                log.warn(msg)
+                return
 
             # there's no need to filter partitions on members of multipaths or
             # fwraid members from lvm since multipath and dmraid are already


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/769aee396f9683c29ffd36b8d965e9692164bcb4


More information about the anaconda-patches mailing list