Bug 2063791

Summary: Cannot install system when having a DDF container
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: python-blivetAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.5CC: aperotti, dlehman, jfindysz, jstodola, vtrefny
Target Milestone: rcKeywords: TestCaseNeeded, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-blivet-3.4.0-13.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2109030 (view as bug list) Environment:
Last Closed: 2022-11-08 09:49:04 UTC Type: Bug
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: 2078815    
Bug Blocks:    
Attachments:
Description Flags
Anaconda logs none

Description Renaud Métrich 2022-03-14 11:56:20 UTC
Created attachment 1865856 [details]
Anaconda logs

Description of problem:

When having a pre-existing DDF container on the system being installed, Anaconda crashes with traceback below:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Traceback (most recent call first):
  File "/usr/lib/python3.6/site-packages/dasbus/client/handler.py", line 497, in _handle_method_error
    raise exception from None
  File "/usr/lib/python3.6/site-packages/dasbus/client/handler.py", line 477, in _get_method_reply
    return self._handle_method_error(error)
  File "/usr/lib/python3.6/site-packages/dasbus/client/handler.py", line 447, in _call_method
    **kwargs,
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/common/task/__init__.py", line 46, in sync_run_task
    task_proxy.Finish()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/ui/lib/storage.py", line 96, in reset_storage
    sync_run_task(task_proxy)
  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 280, in run
    threading.Thread.run(self)
dasbus.error.DBusError: SynchronizedABCMeta object argument after ** must be a mapping, not NoneType
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

The corresponding storage task traceback is the one below:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/dasbus/server/handler.py", line 421, in _method_callback
    *unwrap_variant(parameters)
  File "/usr/lib/python3.6/site-packages/dasbus/server/handler.py", line 234, in _handle_call
    return handler(*parameters)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/common/task/task_interface.py", line 114, in Finish
    self.implementation.finish()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/common/task/task.py", line 161, in finish
    threadMgr.raise_if_error(self._thread_name)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/threading.py", line 171, in raise_if_error
    raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
  File "/usr/lib64/python3.6/site-packages/pyanaconda/threading.py", line 280, in run
    threading.Thread.run(self)
  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/modules/common/task/task.py", line 97, in _task_run_callback
    self._set_result(self.run())
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/reset.py", line 63, in run
    self._reset_storage(self._storage)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/reset.py", line 82, in _reset_storage
    storage.reset()
  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/modules/storage/devicetree/model.py", line 260, 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/lib/python3.6/site-packages/blivet/blivet.py", line 141, 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/lib/python3.6/site-packages/blivet/populator/populator.py", line 417, 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/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 268, in handle_device
    device = helper_class(self, info).run()
  File "/usr/lib/python3.6/site-packages/blivet/populator/helpers/lvm.py", line 60, in run
    self._devicetree._add_slave_devices(self.data)
  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 127, in _add_slave_devices
    self.handle_device(slave_info)
  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 268, in handle_device
    device = helper_class(self, info).run()
  File "/usr/lib/python3.6/site-packages/blivet/populator/helpers/partition.py", line 63, in run
    self._devicetree.handle_device(disk_info)
  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 268, in handle_device
    device = helper_class(self, info).run()
  File "/usr/lib/python3.6/site-packages/blivet/populator/helpers/disk.py", line 71, in run
    device = self._device_class(name, **kwargs)
TypeError: SynchronizedABCMeta object argument after ** must be a mapping, not NoneType
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

I don't see any workaround to have this kind of DDF container be usable, hence the severity.


Version-Release number of selected component (if applicable):

Anaconda 8.5 (33.16.4.15)

How reproducible:

Always

Steps to Reproduce:

1. Setup a VM with 2 disks and boot into installer

2. Drop to shell and create a DDF container

  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
  # mdadm --create /dev/md/ddf --name=ddf --level container --raid-disks=2 --metadata=ddf /dev/vda /dev/vdb
  # mdadm --create /dev/md/vol0 --name=vol0 --level raid1 --raid-disks=2 /dev/md/ddf
  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

3. Rescan the disks

Actual results:

Crash

Expected results:

No crash and container usable

Additional info:

Comment 1 Vojtech Trefny 2022-03-23 09:24:01 UTC
There are two problems here:

1. Anaconda (blivet) crashes when there is a DDF RAID on the system. We have a fix for this: https://github.com/storaged-project/blivet/pull/1031 but it only makes sure the installer doesn't crash, the DDF array is not usable and hidden in the installer, because

2. Historically blivet supports firmware/BIOS RAIDs using dmraid, which is no longer available in RHEL 8. Supporting DDF (and IMSM) arrays using mdadm will require a bigger change in blivet.

Comment 11 Vojtech Trefny 2022-08-05 13:59:03 UTC
Updates image with a proposed fix (for both this issue and rhbz2078815): https://vtrefny.fedorapeople.org/img/rhbz2063791.img (works with both 8.6 and 8.7)

I was able to boot the installer with this, select the DDF RAID set created with mdadm and finish the installation, but we should test it on a real hardware, the mdadm ddf container might be different from the real thing (reported UUID "Linux-MDޭ\xbe\xef " doesn't look correct).

Comment 15 Jan Stodola 2022-08-23 09:51:14 UTC
Reproduced on RHEL-8.6 in a VM using steps from comment 0.
Verified with python3-blivet-3.4.0-13.el8, anaconda detected the existing DDF array, showed it in the GUI/TUI and allowed it to use for the installation. The RAID members were not shown. The installed system booted with the array assembled.

Verified:Tested, SanityOnly (not tested on real HW)

Comment 19 Jan Stodola 2022-08-25 11:22:58 UTC
Checked that python-blivet-3.4.0-13.el8 is in nightly compose RHEL-8.7.0-20220824.0

Moving to VERIFIED

Comment 21 errata-xmlrpc 2022-11-08 09:49:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (python-blivet bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7605