Red Hat Bugzilla – Bug 1263832
blivet.devicescan.populate fails if blivet is unable to scan a disk
Last modified: 2016-12-20 11:45:42 EST
This is with anaconda-core-23.17-1.fc23.x86_64 (python3-blivet-1.10-1.fc23.noarch).
My install of the F23 pre-release was failing at
"/usr/lib64/python3.4/site-packages/pyanaconda/packaging/livepayload.py" line 78 because storage.devicetree.getDeviceByPath(self.data.method.partition) was returning None when self.data.method.partition = '/dev/mapper/live-base'.
It looks like this was because blivet failed to discover all available block devices, due to the following error:
>>> import blivet
>>> b = blivet.Blivet()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.4/site-packages/blivet/devicetree.py", line 554, in populate
File "/usr/lib/python3.4/site-packages/blivet/populator.py", line 1597, in populate
File "/usr/lib/python3.4/site-packages/blivet/populator.py", line 1660, in _populate
File "/usr/lib/python3.4/site-packages/blivet/populator.py", line 724, in addUdevDevice
device = self.addUdevPartitionDevice(info)
File "/usr/lib/python3.4/site-packages/blivet/populator.py", line 448, in addUdevPartitionDevice
blivet.errors.DiskLabelScanError: failed to scan disk sdd
I think there are two bugs here:
(1) If blivet raises an exception like this, maybe anaconda should report an error rather than trying to continue with potentially invalid information. In this case, the error message in the exception would have swiftly pinpointed the source of the problem.
(2) Blivet should probably *continue* the device scan on this sort of failure, rather than aborting.
On my system, /dev/sdd is a USB-attached disk:
# udevadm info /dev/sdd
E: DEVLINKS=/dev/disk/by-path/pci-0000:00:1d.0-usb-0:22.214.171.124:1.0-scsi-0:0:0:0 /dev/disk/by-id/usb-Hitachi_HDT721010SLA360_48014b3efd49130246000000-0:0
...containing a single partition:
# fdisk -l /dev/sdd
Disk /dev/sdd: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 31955D49-D084-4334-96AC-CA22B68B6B32
Device Start End Sectors Size Type
/dev/sdd1 2048 1953525134 1953523087 931.5G Linux filesystem
Simply powering off the device permitted the install to continue.
I've proposed a fix here:
Someone more familiar with the code would have to weigh in on whether or not that makes sense.
You should be presented with an error dialog explaining the problem and offering some guidance on how to proceed. Please attach the logs from /tmp so I can see why this did not happen. Thanks.
I'm afraid the logs are gone and the problem is no longer directly reproducible (because I reformatted the problematic device). However, you can trivially reproduce the error by editing /usr/lib/python3.4/site-packages/blivet/populator.py and having it raise a blivet.errors.DiskLabelScanError exception.
I'll give that a shot today and post the logs.
Created attachment 1074497 [details]
Anaconda responds to an exception from blivet.
This is the UI response to the exception raised by blivet.
I added the following to the top of addUdevPartitiondevice:
if 'vdb1' in name:
msg = "failed to scan disk %s" % name
cls = DiskLabelScanError
This reproduces the failure I was seeing. I've submitted bz #1248225 from anaconda; that bz has all of the logs attached. I've attached to this bz a screenshot showing the UI response to this failure.
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 23 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.