Bug 1194530 - [abrt] blivet-gui: AttributeError: 'NoneType' object has no attribute 'startswith'
Summary: [abrt] blivet-gui: AttributeError: 'NoneType' object has no attribute 'starts...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vojtech Trefny
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:091fac61951dc1a9aca19fcb789...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-20 04:52 UTC by utoplenick
Modified: 2015-12-02 17:29 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-02 09:16:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (2.00 KB, text/plain)
2015-02-20 04:52 UTC, utoplenick
no flags Details
File: blivet-gui-tb (8.48 KB, text/plain)
2015-02-20 04:52 UTC, utoplenick
no flags Details
File: blivet.log (3.80 KB, text/plain)
2015-02-20 04:52 UTC, utoplenick
no flags Details
File: description (2.08 KB, text/plain)
2015-02-20 04:53 UTC, utoplenick
no flags Details
File: environ (2.08 KB, text/plain)
2015-02-20 04:53 UTC, utoplenick
no flags Details
program.log from version 0.2.1-2 (1.25 KB, text/plain)
2015-02-25 09:45 UTC, utoplenick
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1208536 0 unspecified CLOSED Problems recognizing BIOS RAID devices 2021-02-22 00:41:40 UTC

Internal Links: 1208536

Description utoplenick 2015-02-20 04:52:53 UTC
Description of problem:
just start blivet-gui

Version-Release number of selected component:
blivet-gui-0.2.1-1.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
blivet-gui.log: 
cmdline:        /usr/bin/python  /bin/blivet-gui
executable:     /bin/blivet-gui
hashmarkername: blivet-gui
kernel:         3.18.7-200.fc21.x86_64
other involved packages: python-blivet-0.72-2.fc21.noarch
product:        Fedora"
release:        Fedora release 21 (Twenty One)
type:           Python
version:        Fedora

Truncated backtrace:
Traceback (most recent call last):
  File "/bin/blivet-gui", line 103, in <module>
    main()
  File "/bin/blivet-gui", line 95, in main
    win = main_window()
  File "/usr/lib/python2.7/site-packages/blivetgui/main_window.py", line 63, in main_window
    ListDevices(win, builder, kickstart)
  File "/usr/lib/python2.7/site-packages/blivetgui/list_devices.py", line 61, in __init__
    self.b = BlivetUtils(self.main_window, kickstart)
  File "/usr/lib/python2.7/site-packages/blivetgui/utils.py", line 163, in __init__
    self.storage.reset()
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 471, in reset
    self.devicetree.populate(cleanupOnly=cleanupOnly)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 2078, in populate
    self._populate()
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 2144, in _populate
    self.addUdevDevice(dev)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1231, in addUdevDevice
    self.handleUdevDeviceFormat(info, device)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1846, in handleUdevDeviceFormat
    self.handleUdevMDMemberFormat(info, device)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1602, in handleUdevMDMemberFormat
    exists=True)
  File "/usr/lib/python2.7/site-packages/blivet/devices/md.py", line 87, in __init__
    sysfsPath=sysfsPath)
  File "/usr/lib/python2.7/site-packages/blivet/devices/container.py", line 63, in __init__
    super(ContainerDevice, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 105, in __init__
    super(StorageDevice, self).__init__(name, parents=parents)
  File "/usr/lib/python2.7/site-packages/blivet/devices/device.py", line 83, in __init__
    if not self.isNameValid(name):
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 764, in isNameValid
    if name.startswith("cciss/"):
AttributeError: 'NoneType' object has no attribute 'startswith'

Comment 1 utoplenick 2015-02-20 04:52:56 UTC
Created attachment 993822 [details]
File: backtrace

Comment 2 utoplenick 2015-02-20 04:52:58 UTC
Created attachment 993823 [details]
File: blivet-gui-tb

Comment 3 utoplenick 2015-02-20 04:52:59 UTC
Created attachment 993824 [details]
File: blivet.log

Comment 4 utoplenick 2015-02-20 04:53:00 UTC
Created attachment 993825 [details]
File: description

Comment 5 utoplenick 2015-02-20 04:53:01 UTC
Created attachment 993826 [details]
File: environ

Comment 6 mulhern 2015-02-20 14:02:12 UTC
Could you post program.log as well? It would be useful to see the output of mdexamine call.

Comment 7 Vojtech Trefny 2015-02-23 13:59:25 UTC
mulhern: I actually forgot to store the program.log, so it is not possible.

utoplenick: There is a new version of blivet-gui in my copr repository (0.2.2). If you wouldn't mind, please install it and run blivet-gui again -- it should fail the same way but now with the program.log available (in /tmp/program.log, the crash reporting tool shoud attach it automatically). It would really help us with debugging of this issue.

Comment 8 utoplenick 2015-02-24 20:30:55 UTC
Vojtech: sorry, but I cannot find new version for fedora 21.

Comment 9 Vojtech Trefny 2015-02-25 09:30:03 UTC
utoplenick: Sorry, my bad, I didn't realize you are using Fedora 21. New version was available only for rawhide... Sorry again. New build for Fedora 21 (0.2.1-2) is available now in my copr (vtrefny/blivet-gui).

Comment 10 utoplenick 2015-02-25 09:45:38 UTC
Created attachment 995063 [details]
program.log from version 0.2.1-2

Here is program.log

Comment 11 mulhern 2015-02-25 12:44:56 UTC
And here's the relevant mdexamine result.

INFO:program: Running... mdadm --examine --export /dev/sda
INFO:program: MD_METADATA=imsm
INFO:program: MD_LEVEL=container
INFO:program: MD_UUID=1659d7f3:8395e97a:1375cc63:0161dc68
INFO:program: MD_DEVICES=4
DEBUG:program: Return code: 0
INFO:program: Running... mdadm --examine --brief /dev/sda
INFO:program: ARRAY metadata=imsm UUID=1659d7f3:8395e97a:1375cc63:0161dc68
INFO:program: ARRAY /dev/md/Volume0 container=1659d7f3:8395e97a:1375cc63:0161dc68 member=0 UUID=d5410cf2:25a7af2c:1b865dca:59244416
DEBUG:program: Return code: 0

So, mdexamine isn't giving us the necessary information, clearly. Maybe this has to do with the fact that the metadata is imsm, and maybe not. If the metadata fails to provide the name directly, the fallback is to try to extract the name from the device, "/dev/md/Volume0". This functionality should probably be in udev, not in devicetree, but anyway, it should end up giving the name "Volume0". I suspect it does, but "Volume0" is rejected as a name because it doesn't look like the regular expression r'md\d+$' expects it to. After that, the cause is lost. The question is...how did that "Volume0" get there, and is it legit? What is going on w/ this array? Also, should we guard against the name being None? We guard against level, number of devices, and uuid being None by returning and we ensure that metadate version has some value. Perhaps we should simply return if md_name goes undiscovered.

Comment 12 mulhern 2015-02-25 12:48:34 UTC
Could you look at comment #11 and give your opinion on whether a quick fix, (exiting when md_name is None) is the right thing, or whether it needs a closer look?

Comment 13 David Lehman 2015-04-06 15:18:52 UTC
We should be coming up with the name "Volume0", which is totally legit.

Comment 14 mulhern 2015-04-06 16:13:20 UTC
This bug is related to bz#1208536. In storage log it's clear that the array initially can't be found because, like that bug, there is no UUID on the format because udev has not supplied one. We can supply one, like for the fix for that bug. The missing name problem will still exist, but it's looking less like a disagreement about the format of the name, and more like an inscrutable problem w/ mdexamine. Something in that block below the

# mdexamine yields MD_METADATA only for metadata version > 0.90

is going wrong, but it is less and less clear what.

Comment 15 mulhern 2015-06-23 14:01:27 UTC
Also related: https://github.com/rhinstaller/blivet/pull/161

Comment 16 Fedora End Of Life 2015-11-04 15:29:37 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 Fedora End Of Life 2015-12-02 09:16:25 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.