Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1557957

Summary: TypeError: __init__() got an unexpected keyword argument 'wwn'
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: python-blivetAssignee: Blivet Maintenance Team <blivet-maint-list>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: amulhern, anaconda-maint-list, awilliam, blivet-maint-list, jkonecny, jonathan, kellin, lruzicka, mkolman, robatino, rvykydal, sbueno, vanmeeuwen+fedora, v.podzimek+fedora, vponcova, vtrefny, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1116bc4a03dcde07589c7bd7c05a2314203b1d310e3b91a6a949ad1a096c8ad1;VARIANT_ID=workstation; AcceptedBlocker
Fixed In Version: python-blivet-3.0.0-0.6.b1.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-26 22:29:41 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: 1469204    
Attachments:
Description Flags
File: anaconda-tb
none
File: anaconda.log
none
File: dbus.log
none
File: environ
none
File: journalctl
none
File: lsblk_output
none
File: nmcli_dev_list
none
File: os_info
none
File: program.log
none
File: storage.log
none
File: ifcfg.log none

Description Kamil Páral 2018-03-19 11:23:15 UTC
Description of problem:
Anaconda crashes immediately on startup when I have 3 disks in my PC, sda is a standard drive, and sdb+sdc are put into RAID0. All disks were completely wiped using dd (beginning and end of each disk) before creating the RAID volume and booting into LiveCD, so this bug should not be caused by any leftover data from previous installations.

Version-Release number of selected component:
anaconda-core-28.22.2-3.fc28.x86_64

The following was filed automatically by anaconda:
anaconda 28.22.2 exception report
Traceback (most recent call first):
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/blivet/devices/md.py", line 681, in __init__
    super(MDBiosRaidArrayDevice, self).__init__(name, **kwargs)
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/blivet/populator/helpers/disk.py", line 71, in run
    device = self._device_class(name, **kwargs)
  File "/usr/lib/python3.6/site-packages/blivet/populator/populator.py", line 263, in handle_device
    device = helper_class(self, info).run()
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/blivet/populator/populator.py", line 462, in _populate
    self.handle_device(dev)
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/blivet/populator/populator.py", line 412, in populate
    self._populate()
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/blivet/blivet.py", line 161, in reset
    self.devicetree.populate(cleanup_only=cleanup_only)
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/storage/osinstall.py", line 1665, in reset
    super().reset(cleanup_only=cleanup_only)
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/storage/osinstall.py", line 2186, in storage_initialize
    storage.reset()
  File "/usr/lib64/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/threading.py", line 291, in run
    threading.Thread.run(self)
TypeError: __init__() got an unexpected keyword argument 'wwn'

Additional info:
addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=/images/pxeboot/vmlinuz root=live:CDLABEL=Fedora-WS-Live-28-20180318-n-0 rd.live.image quiet
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.16.0-0.rc4.git0.1.fc28.x86_64
other involved packages: python3-libs-3.6.4-16.fc28.x86_64, python3-blivet-3.0.0-0.4.b1.fc28.noarch
product:        Fedora
release:        Fedora release 28 (Twenty Eight)
type:           anaconda
version:        28

Potential duplicate: bug 1557270

Comment 1 Kamil Páral 2018-03-19 11:23:23 UTC
Created attachment 1409815 [details]
File: anaconda-tb

Comment 2 Kamil Páral 2018-03-19 11:23:25 UTC
Created attachment 1409816 [details]
File: anaconda.log

Comment 3 Kamil Páral 2018-03-19 11:23:27 UTC
Created attachment 1409817 [details]
File: dbus.log

Comment 4 Kamil Páral 2018-03-19 11:23:28 UTC
Created attachment 1409818 [details]
File: environ

Comment 5 Kamil Páral 2018-03-19 11:23:31 UTC
Created attachment 1409819 [details]
File: journalctl

Comment 6 Kamil Páral 2018-03-19 11:23:32 UTC
Created attachment 1409820 [details]
File: lsblk_output

Comment 7 Kamil Páral 2018-03-19 11:23:34 UTC
Created attachment 1409821 [details]
File: nmcli_dev_list

Comment 8 Kamil Páral 2018-03-19 11:23:35 UTC
Created attachment 1409822 [details]
File: os_info

Comment 9 Kamil Páral 2018-03-19 11:23:37 UTC
Created attachment 1409823 [details]
File: program.log

Comment 10 Kamil Páral 2018-03-19 11:23:39 UTC
Created attachment 1409824 [details]
File: storage.log

Comment 11 Kamil Páral 2018-03-19 11:23:41 UTC
Created attachment 1409825 [details]
File: ifcfg.log

Comment 12 Kamil Páral 2018-03-19 11:31:52 UTC
Proposing as a Beta blocker:
" The installer must be able to detect and install to hardware or firmware RAID storage devices."
https://fedoraproject.org/wiki/Fedora_28_Beta_Release_Criteria#Hardware_and_firmware_RAID

Comment 13 Vendula Poncova 2018-03-19 11:49:36 UTC
It looks to be a problem in the storage library, reassigning.

Comment 14 Adam Williamson 2018-03-19 21:23:46 UTC
Discussed at 2018-03-19 Fedora 28 blocker review meeting: https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2018-03-19/f28-blocker-review.2018-03-19-16.02.html . Accepted as a blocker issue: this seems like a clear showstopper for installs to Intel firmware RAID sets, which is a violation of Beta criterion "The installer must be able to detect and install to hardware or firmware RAID storage devices".

Comment 15 Adam Williamson 2018-03-19 23:41:28 UTC
OK, so this is a bit twisty, but basically:

blivet/populator/helpers/disk.py defines a class DiskDevicePopulator , with a class attribute _device_class that's intended to be a Device subclass , and a method _get_kwargs() that - unless _device_class is DiskDevice - returns a dict with a 'wwn' key. It also has a 'run' method which does this:

        kwargs = self._get_kwargs()
        device = self._device_class(name, **kwargs)

There is a subclass of DiskDevicePopulator called MDBiosRaidDevicePopulator which defines _device_class as MDBiosRaidArrayDevice . That's a Device subclass - defined in blivet/blivet/devices/md.py - that takes **kwargs, but calls `super(MDBiosRaidArrayDevice, self).__init__(name, **kwargs)`. Its parent class is MDRaidArrayDevice, and *that* class - defined in the same file - does *not* take a 'wwn' kwarg.

MDBiosRaidDevicePopulator overrides the parent's (that's DiskDevicePopulator, remember) _get_kwargs(), but the child's method does start by calling the parent's:

    def _get_kwargs(self):
        kwargs = super(MDBiosRaidDevicePopulator, self)._get_kwargs()

it then does some stuff to *add* new kwargs, and later on it removes some:

        # remove some kwargs that don't make sense for md
        del kwargs["model"]
        del kwargs["serial"]
        del kwargs["vendor"]
        del kwargs["bus"]

but it does *not* remove wwn. Thus, ultimately, we wind up calling `MDRaidArrayDevice(wwn=something)` and we blow up.

Obvious fix: have MDBiosRaidDevicePopulator._get_kwargs() do:

        del kwargs["wwn"]

Also, check if there are any other cases where we should do this.

Comment 16 Adam Williamson 2018-03-19 23:52:39 UTC
https://github.com/storaged-project/blivet/pull/671 should fix this. If anyone wants to generate an updates.img and try it, go for it. Otherwise I'll try and post one later.

Comment 17 Fedora Update System 2018-03-20 21:37:04 UTC
python-blivet-3.0.0-0.6.b1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e6332fc675

Comment 18 Adam Williamson 2018-03-20 21:54:48 UTC
Here's an updates.img you can use to test the fix:

http://www.happyassassin.net/updates/1557957.0.img

can someone with an affected system please test an install of a recent F28 image with 'inst.updates=http://www.happyassassin.net/updates/1557957.0.img' ? I can't do it myself as I don't have an Intel fwraid motherboard any more :(

Comment 19 Lukas Ruzicka 2018-03-21 09:41:03 UTC
(In reply to Adam Williamson from comment #18)
> Here's an updates.img you can use to test the fix:
> 
> http://www.happyassassin.net/updates/1557957.0.img
> 
> can someone with an affected system please test an install of a recent F28
> image with 'inst.updates=http://www.happyassassin.net/updates/1557957.0.img'
> ? I can't do it myself as I don't have an Intel fwraid motherboard any more
> :(

Anaconda no longer crashes during start up so that problem seems to be fixed, but it still crashes later, during disk selection, see bug 1558906.

Comment 20 Fedora Update System 2018-03-21 14:13:56 UTC
python-blivet-3.0.0-0.6.b1.fc28 has been pushed to the Fedora 28 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-2018-e6332fc675

Comment 21 Fedora Update System 2018-03-26 22:29:41 UTC
python-blivet-3.0.0-0.6.b1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.