Bug 1737490

Summary: volgroup --reserved-space results in a traceback during installation
Product: Red Hat Enterprise Linux 8 Reporter: jcastran
Component: python-blivetAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.1CC: cshao, hbarcomb, jikortus, jrusz, jstodola, kwalker, lsvaty, lukasz.bochenski, mavital, nlevy, peyu, pkhedeka, qiyuan, rhandlin, sbonazzo, shlei, vtrefny, weiwang, yaniwang, yturgema
Target Milestone: rcKeywords: TestCaseNeeded
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-blivet-3.2.2-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1774477 (view as bug list) Environment:
Last Closed: 2020-11-04 03:22:23 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: 1774477    

Comment 1 Kyle Walker 2019-08-06 12:39:52 UTC
Description of problem:
When using the "--reserved-space" option in kickstart, the installation fails with a traceback

Version-Release number of selected component (if applicable):
anaconda-29.19.0.40-1.el8
RHEL 8.0

How reproducible:
Everytime

Steps to Reproduce:
1. Create a basic kickstart with volgroup and --reserved space

   clearpart --all --initlabel
   zerombr
   part pv.01 --size=1 --grow --ondisk=sda
   volgroup vg0  pv.01 --reserved-space=20
   part /boot --size=500 --ondisk=sda --fstype=xfs
   logvol / --name=root --vgname=vg0 --size=1 --grow

2. kickstart a RHEL 8 installation


Actual results:
13:51:17,001 CRT exception: Traceback (most recent call last):
  File "/sbin/anaconda", line 798, in <module>
    anaconda._intf.setup(ksdata)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/ui/tui/__init__.py", line 208, in setup
    should_schedule = obj.setup(self.ENVIRONMENT)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/ui/tui/hubs/summary.py", line 74, in setup
    spoke.execute()
  File "/usr/lib64/python3.6/site-packages/pyanaconda/ui/tui/spokes/storage.py", line 452, in execute
    doKickstartStorage(self.storage, self.data, self.instclass)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/kickstart.py", line 2845, in doKickstartStorage
    ksdata.volgroup.execute(storage, ksdata, instClass)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/kickstart.py", line 2192, in execute
    v.execute(storage, ksdata, instClass)
  File "/usr/lib64/python3.6/site-packages/pyanaconda/kickstart.py", line 2264, in execute
    request.reserved_space = self.reserved_space
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
AttributeError: can't set attribute


Expected results:
Installation reserves the specified amount of MB on the Volume Group

Additional info:

Comment 2 Brian Lane 2019-11-18 20:16:38 UTC
This is a problem with blivet, not pykickstart.

File "/usr/lib64/python3.6/site-packages/pyanaconda/kickstart.py", line 2264, in execute
    request.reserved_space = self.reserved_space
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
AttributeError: can't set attribute

Means that something went wrong with the blivet request object created with:
request = storage.new_vg(parents=pvs, ...

Comment 3 Vojtech Trefny 2019-11-20 11:47:17 UTC
upstream PR: https://github.com/storaged-project/blivet/pull/813

updates image: https://vtrefny.fedorapeople.org/img/rhbz1737490.img (contains also fix for rhbz#1774477).

Comment 4 Vojtech Trefny 2020-01-10 12:05:26 UTC
*** Bug 1737588 has been marked as a duplicate of this bug. ***

Comment 5 Vojtech Trefny 2020-04-15 08:04:12 UTC
*** Bug 1816050 has been marked as a duplicate of this bug. ***

Comment 8 Jakub Rusz 2020-06-16 13:20:13 UTC
Test for this is created and merged.

Comment 12 errata-xmlrpc 2020-11-04 03:22:23 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-2020:4728