Bug 1528103

Summary: Crash when creating a container (VG, RAID set etc.): TypeError: suggest_container_name() got an unexpected keyword argument 'hostname'
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: blivet-guiAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: mkolman, robatino, vtrefny
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: blivet-gui-2.1.7-4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-08 17:35:37 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: 1469204    

Description Adam Williamson 2017-12-21 01:10:10 UTC
blivet has changed its `suggest_container_name()` method to no longer accept a kwarg named 'hostname'. blivet-gui has not been adjusted for this. Consequently, any attempt to create an LVM VG, RAID set etc. from blivet-gui with current Rawhide blivet triggers a crash like this:

17:33:41,268 CRT exception: Traceback (most recent call last):

  File "/usr/lib/python3.6/site-packages/blivetgui/blivetgui.py", line 455, in add_device
    self._reraise_exception(result.exception, result.traceback)

  File "/usr/lib/python3.6/site-packages/blivetgui/blivetgui.py", line 219, in _reraise_exception
    raise type(exception)(str(exception) + "\n" + traceback)

TypeError: suggest_container_name() got an unexpected keyword argument 'hostname'
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/blivetgui/blivet_utils.py", line 1162, in add_device
    actions = add_function(self, user_input)
  File "/usr/lib/python3.6/site-packages/blivetgui/blivet_utils.py", line 1048, in _create_mdraid
    device_name = self._pick_device_name(user_input.name)
  File "/usr/lib/python3.6/site-packages/blivetgui/blivet_utils.py", line 781, in _pick_device_name
    name = self.storage.suggest_container_name(hostname=socket.gethostname(), prefix=prefix)
  File "/usr/lib/python3.6/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
TypeError: suggest_container_name() got an unexpected keyword argument 'hostname'

I am going to submit a pull request to fix this (the fix is trivial). Proposing as a Beta blocker per criterion "When using the custom partitioning flow, the installer must be able to: ... Create mount points backed by ext4 partitions, LVM volumes or btrfs volumes, or software RAID arrays at RAID levels 0, 1 and 5 containing ext4 partitions" - assuming we apply the 'custom partitioning' requirements to both the old, in-anaconda custom part implementation and the 'custom partitioning via blivet-gui' implementation.

Comment 1 Adam Williamson 2017-12-21 01:12:29 UTC
https://github.com/storaged-project/blivet-gui/pull/98

Comment 2 Adam Williamson 2018-01-08 17:35:37 UTC
This is fixed now, confirmed (relevant openQA tests are passing, e.g. https://openqa.fedoraproject.org/tests/184749 ). So, closing.