Bug 1855724

Summary: AttributeError: 'LVMLogicalVolumeDevice' object has no attribute 'single_pv'
Product: Red Hat Enterprise Linux 8 Reporter: Jan Stodola <jstodola>
Component: anacondaAssignee: Vladimír Slávik <vslavik>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: rvykydal, sbueno, vtrefny
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-33.16.3.21-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 03:23:57 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:    
Bug Blocks: 1812825    

Description Jan Stodola 2020-07-10 10:32:26 UTC
Description of problem:
Traceback appears when trying to create partitioning with / on LVM, but with no /boot:

anaconda 33.16.3.10 exception report
Traceback (most recent call first):
  File "/usr/lib/python3.6/site-packages/dasbus/client/handler.py", line 498, in _handle_method_error
    raise exception from None
  File "/usr/lib/python3.6/site-packages/dasbus/client/handler.py", line 476, 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/gui/spokes/custom_storage.py", line 914, in _do_check
    sync_run_task(task_proxy)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/ui/gui/spokes/custom_storage.py", line 966, in on_back_clicked
    if not self._do_check():
dasbus.error.DBusError: 'LVMLogicalVolumeDevice' object has no attribute 'single_pv'


ERROR:anaconda.modules.common.task.task:Thread AnaTaskThread-StorageValidateTask-1 has failed: Traceback (most recent call last):
  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/partitioning/validate.py", line 51, in run
    return self._validate_storage(self._storage)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/partitioning/validate.py", line 59, in _validate_storage
    result = storage_checker.check(storage)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/checker/utils.py", line 629, in check
    check(storage, constraints, result.add_error, result.add_warning)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/checker/utils.py", line 91, in verify_s390_constraints
    if root.type == 'lvmlv' and not root.single_pv:
AttributeError: 'LVMLogicalVolumeDevice' object has no attribute 'single_pv'

INFO:anaconda.threading:Thread Done: AnaTaskThread-StorageValidateTask-1 (4396074662160)
WARNING:dasbus.server.handler:The call org.fedoraproject.Anaconda.Task.Finish has failed with an exception:
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/partitioning/validate.py", line 51, in run
    return self._validate_storage(self._storage)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/partitioning/validate.py", line 59, in _validate_storage
    result = storage_checker.check(storage)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/checker/utils.py", line 629, in check
    check(storage, constraints, result.add_error, result.add_warning)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/storage/checker/utils.py", line 91, in verify_s390_constraints
    if root.type == 'lvmlv' and not root.single_pv:
AttributeError: 'LVMLogicalVolumeDevice' object has no attribute 'single_pv'

06:21:44,404 CRT exception: Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/pyanaconda/ui/gui/spokes/custom_storage.py", line 966, in on_back_clicked
    if not self._do_check():
  File "/usr/lib64/python3.6/site-packages/pyanaconda/ui/gui/spokes/custom_storage.py", line 914, in _do_check
    sync_run_task(task_proxy)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/modules/common/task/__init__.py", line 46, in sync_run_task
    task_proxy.Finish()
  File "/usr/lib/python3.6/site-packages/dasbus/client/handler.py", line 447, in _call_method
    **kwargs,
  File "/usr/lib/python3.6/site-packages/dasbus/client/handler.py", line 476, in _get_method_reply
    return self._handle_method_error(error)
  File "/usr/lib/python3.6/site-packages/dasbus/client/handler.py", line 498, in _handle_method_error
    raise exception from None
dasbus.error.DBusError: 'LVMLogicalVolumeDevice' object has no attribute 'single_pv'


Reproduced on s390x, but not able to reproduce on x86_64 (there is an expected error message: "/boot file system cannot be of type lvmlv").

Version-Release number of selected component (if applicable):
RHEL-8.3.0-20200701.2
anaconda-33.16.3.10-1.el8
python3-blivet-3.2.2-3.el8

How reproducible:
Always on s390x

Steps to Reproduce:
1. Start vnc installation on s390x
2. Proceed to the custom partitioning spoke
3. Remove existing partitions
4. Let anaconda create the partitions (LVM scheme)
5. Delete the /boot mountpoint
6. Click DOne

Actual results:
Anaconda traceback

Expected results:
Anaconda error message (Error checking storage configuration... ) since /boot on LVM is not supported.

Comment 2 Vladimír Slávik 2020-08-18 16:59:30 UTC
Hi Vojta, I can't find any reference to "single_pv" or "singlePV" in the whole blivet, even going as far back as 2.0.0. Do you have any idea what it was, if ever, and how would I ask for that now? The relevant snippet from anaconda's verify_s390_constraints() is:

>    root = storage.fsset.root_device
>    if '/boot' not in storage.mountpoints and root:
>        if root.type == 'lvmlv' and not root.single_pv:

I'm thinking something along the lines of root.vg.pv_count == 1. The doc string we have in verify_s390_constraints() makes me believe anaconda doesn't exercise any control over where the lvs are placed, so that might be good enough, even if technically this might not cover all cases?

Comment 4 Jan Stodola 2020-08-19 07:54:45 UTC
I agree with Vojta's comment. Although it was possible to have /boot on LVM in RHEL-6.x, this feature was removed and anaconda should not allow such a disk layout.

Comment 5 Vladimír Slávik 2020-08-20 13:06:39 UTC
PR with fix candidate: https://github.com/rhinstaller/anaconda/pull/2797

Comment 8 Jan Stodola 2020-08-27 18:15:56 UTC
Retested on RHEL-8.3.0-20200825.0 with anaconda-33.16.3.21-1.el8, this issue is fixed.

Moving to VERIFIED.

Comment 11 errata-xmlrpc 2020-11-04 03:23:57 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 (anaconda 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-2020:4729