New: [rhinstaller/blivet/pulls/161 master] Don't fail in storage.py:isNameValid when name is None

alexanderlaw installerbot-noreply at redhat.com
Thu Jun 18 11:00:10 UTC 2015


With ISM RAID-0 configured I get the following error when using blivet:

Traceback (most recent call last):
  File "list-devices.py", line 34, in <module>
    storage.reset()             # detect system storage configuration
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 372, in reset
    self.devicetree.populate(cleanupOnly=cleanupOnly)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 2113, in populate
    self._populate()
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 2179, in _populate
    self.addUdevDevice(dev)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1258, in addUdevDevice
    self.handleUdevDeviceFormat(info, device)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1879, in handleUdevDeviceFormat
    self.handleUdevMDMemberFormat(info, device)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 1637, 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 106, 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 787, in isNameValid
    if name.startswith("cciss/"):
AttributeError: 'NoneType' object has no attribute 'startswith'

mdadm --examine --brief /dev/sdc
ARRAY metadata=imsm UUID=17ca54e9:88114b9d:2072a87d:cc2c4c61
ARRAY /dev/md/Test0 container=17ca54e9:88114b9d:2072a87d:cc2c4c61 member=0 UUID=11cc7cbd:e42aabbf:d57faea8:baaa6425

md_info: {'MD_LEVEL': 'container', 'MD_UUID': '17ca54e9-8811-4b9d-2072-a87dcc2c4c61', 'MD_DEVICES': '2', 'MD_METADATA': 'imsm'}

Device name was not detected due to some error, but I think that None value should be considered as not valid name anyway.

-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/161


More information about the anaconda-patches mailing list