Bug 1798792

Summary: blivet.errors.DeviceTreeError: failed to add slave root00p2 of device root00
Product: [Fedora] Fedora Reporter: lnie <lnie>
Component: python-blivetAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: anaconda-maint-list, awilliam, blivet-maint-list, dlehman, fzatlouk, jkonecny, jonathan, kellin, lnie, mkolman, pmkellly72, robatino, rvykydal, vanmeeuwen+fedora, vponcova, vtrefny, wwoods
Target Milestone: ---Keywords: Reopened
Target Release: ---Flags: lnie: needinfo-
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:23175cf659f1498f59738df076439fc5a3984bb51ef175fe966ad9e3b794270a; AcceptedBlocker
Fixed In Version: python-blivet-3.2.0-3.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-13 19:37:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1705303    
Attachments:
Description Flags
File: anaconda-tb
none
File: anaconda.log
none
File: dbus.log
none
File: dnf.librepo.log
none
File: environ
none
File: lorax-packages.log
none
File: lsblk_output
none
File: nmcli_dev_list
none
File: os_info
none
File: program.log
none
File: storage.log
none
File: syslog
none
File: packaging.log none

Description lnie 2020-02-06 02:17:21 UTC
Version-Release number of selected component:
anaconda-32.22

The following was filed automatically by anaconda:
anaconda 32.22 exception report
Traceback (most recent call first):
  File "/usr/lib/python3.8/site-packages/blivet/populator/populator.py", line 137, in _add_slave_devices
    raise DeviceTreeError(msg)
  File "/usr/lib/python3.8/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/blivet/populator/helpers/mdraid.py", line 55, in run
    self._devicetree._add_slave_devices(self.data)
  File "/usr/lib/python3.8/site-packages/blivet/populator/populator.py", line 265, in handle_device
    device = helper_class(self, info).run()
  File "/usr/lib/python3.8/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/blivet/populator/populator.py", line 459, in _populate
    self.handle_device(dev)
  File "/usr/lib/python3.8/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/blivet/populator/populator.py", line 414, in populate
    self._populate()
  File "/usr/lib/python3.8/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/blivet/blivet.py", line 132, in reset
    self.devicetree.populate(cleanup_only=cleanup_only)
  File "/usr/lib/python3.8/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib64/python3.8/site-packages/pyanaconda/storage/osinstall.py", line 247, in reset
    super().reset(cleanup_only=cleanup_only)
  File "/usr/lib/python3.8/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib64/python3.8/site-packages/pyanaconda/storage/initialization.py", line 229, in _reset_storage
    storage.reset()
  File "/usr/lib64/python3.8/site-packages/pyanaconda/storage/initialization.py", line 156, in reset_storage
    _reset_storage(storage)
  File "/usr/lib64/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.8/site-packages/pyanaconda/threading.py", line 280, in run
    threading.Thread.run(self)
blivet.errors.DeviceTreeError: failed to add slave root00p2 of device root00

Additional info:
addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-rawh rd.live.check quiet
executable:     /sbin/anaconda
hashmarkername: anaconda
hawkey.log:     INFO Feb-06 02:14:46 === Started libdnf-0.43.1 ===
kernel:         5.5.0-0.rc6.git3.1.fc32.x86_64
product:        Fedora
release:        Fedora release 32 (Rawhide)
release_type:   pre-release
type:           anaconda
version:        rawhide

Comment 1 lnie 2020-02-06 02:18:28 UTC
Created attachment 1658051 [details]
File: anaconda-tb

Comment 2 lnie 2020-02-06 02:18:30 UTC
Created attachment 1658052 [details]
File: anaconda.log

Comment 3 lnie 2020-02-06 02:18:32 UTC
Created attachment 1658053 [details]
File: dbus.log

Comment 4 lnie 2020-02-06 02:18:33 UTC
Created attachment 1658054 [details]
File: dnf.librepo.log

Comment 5 lnie 2020-02-06 02:18:35 UTC
Created attachment 1658055 [details]
File: environ

Comment 6 lnie 2020-02-06 02:18:40 UTC
Created attachment 1658056 [details]
File: lorax-packages.log

Comment 7 lnie 2020-02-06 02:18:42 UTC
Created attachment 1658057 [details]
File: lsblk_output

Comment 8 lnie 2020-02-06 02:18:44 UTC
Created attachment 1658058 [details]
File: nmcli_dev_list

Comment 9 lnie 2020-02-06 02:18:46 UTC
Created attachment 1658059 [details]
File: os_info

Comment 10 lnie 2020-02-06 02:18:50 UTC
Created attachment 1658060 [details]
File: program.log

Comment 11 lnie 2020-02-06 02:19:00 UTC
Created attachment 1658061 [details]
File: storage.log

Comment 12 lnie 2020-02-06 02:19:37 UTC
Created attachment 1658062 [details]
File: syslog

Comment 13 lnie 2020-02-06 02:19:39 UTC
Created attachment 1658063 [details]
File: packaging.log

Comment 14 lnie 2020-02-06 07:40:26 UTC
Similar problem has been detected:

1 boot the installer with virt-manager,at Installation Destination screen, select two disks,create software raid disk(I've tested raid0 and raid1),then finish the installation
2 boot the newly installed machine with the installer,the crash will happens on the welcome page
FYI:With scsi and IDE you will see this crash, if you change the disk bus to virtio and reboot the installer,the crash will be gone

addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-rawh rd.live.check quiet
hashmarkername: anaconda
hawkey.log:     INFO Feb-06 07:37:16 === Started libdnf-0.43.1 ===
kernel:         5.5.0-0.rc6.git3.1.fc32.x86_64
package:        anaconda-32.22
product:        Fedora
reason:         blivet.errors.DeviceTreeError: failed to add slave root2 of device root
release:        Fedora release 32 (Rawhide)
release_type:   pre-release
version:        rawhide

Comment 15 lnie 2020-02-06 07:47:52 UTC
The same crash will happen with SATA

Comment 16 Fedora Blocker Bugs Application 2020-02-06 07:48:52 UTC
Proposed as a Blocker for 32-beta by Fedora user lnie using the blocker tracking app because:

 This seems affected:
The installer must be able to complete an installation using any supported locally connected storage interface.

Comment 17 Vendula Poncova 2020-02-10 11:16:26 UTC
It seems to be an issue in the storage configuration library. Reassigning to blivet.

Comment 18 FrantiĊĦek Zatloukal 2020-02-10 18:06:12 UTC
Discussed during the 2020-02-10 blocker review meeting: [1]

The decision to classify this bug as an AcceptedBlocker was made:

"The installer must be able to: Correctly interpret...any disk with a valid ms-dos or gpt disk label and partition table containing...software RAID arrays at RAID levels 0, 1 and 5 containing ext4 partitions"

[1] https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2020-02-10/f32-blocker-review.2020-02-10-17.01.log.txt

Comment 19 David Lehman 2020-02-10 21:03:24 UTC
This looks to be related to https://github.com/storaged-project/blivet/pull/796

Comment 20 Ben Cotton 2020-02-11 16:31:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 21 Pat Kelly 2020-02-17 15:12:09 UTC
I've been trying to install F32 Workstation live on my bare metal test machine since before the branch with the latest one being the Branched 0214 The installs can't seem to partition the disk.

Comment 22 Vojtech Trefny 2020-03-05 12:27:39 UTC
upstream PR: https://github.com/storaged-project/blivet/pull/827

updates image: https://vtrefny.fedorapeople.org/img/rhbz1798792.img

With this fix installer doesn't immediately crush, but the existing RAID cannot be reused, https://bugzilla.redhat.com/show_bug.cgi?id=1809117 needs to be fixed first.

Comment 23 Adam Williamson 2020-03-10 01:50:23 UTC
mdadm fix is being pushed stable shortly.

Comment 24 lnie 2020-03-11 05:31:00 UTC
This bug is fixed in today's compose.

Comment 25 Adam Williamson 2020-03-11 06:36:56 UTC
Are you sure? The PR has not been merged and there hasn't been a blivet build since January...

Comment 26 Vojtech Trefny 2020-03-11 06:49:39 UTC
I don't think this is fixed by the mdadm fix -- I've just tested with latest F32 build (with mdadm udev rules in the correct folder) and anaconda is still crashing without the blivet patch.

I'll merge the blivet patch and do a new build today. I was waiting for the mdadm udev fix because I saw multiple weird RAID related issues and I wasn't sure what is caused by mdadm and what by blivet and if the proposed blivet fix actually fixes everything.

Comment 27 lnie 2020-03-11 07:20:02 UTC
Sorry for the wrong put,I didn't look deep into this bug,and thought this bug will be fixed by mdadm fix,so just did a quick test.I created a new RAID  system with today's installer successfully,forgetting to change the bus to a non-virtio one when check this bug.

Comment 28 Adam Williamson 2020-03-11 17:43:47 UTC
lnie: also remember this bug is for the problem with recognizing an *existing* RAID set, not creating a new one...

Comment 29 lnie 2020-03-12 01:30:52 UTC
yes,I clearly know.Creating a new one to check #1804080,then have a quick check of this one,I thought by"mdadm fix is being pushed stable shortly." you means this bug will be fix by the mdadm fix,won't make this kind of mistake again,thanks.

Comment 30 Fedora Update System 2020-03-12 18:49:19 UTC
python-blivet-3.2.0-3.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-de2011ad3a

Comment 31 Adam Williamson 2020-03-13 05:03:51 UTC
I couldn't verify this in a VM as I don't have enough disk space handy, but I did test on a physical machine with SATA disks. I did a manual software RAID install (/boot on plain ext4, / , /home and swap on software RAID-1) from the Everything netinst, booted and verified it was really RAID and working, booted back to the installer, went to custom partitioning, and it recognized the existing software RAID partitions. I reused them all (reformatting them) and proceeded with installation, no errors and the install is running.

Lili, if you could verify on your setup that'd be great.

Comment 32 lnie 2020-03-13 07:26:25 UTC
Adam,I've booted Fedora-Server-netinst-x86_64-32-20200312.n.0.iso, checked with SCSI, SATA and IDE, on RAID0,RAID1 and RAID4 VM,didn't see the crash any more

Comment 33 Fedora Update System 2020-03-13 19:37:26 UTC
python-blivet-3.2.0-3.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.