Bug 878053 - storage: DeviceTreeError: MD RAID device None already in devicetree as 0
Summary: storage: DeviceTreeError: MD RAID device None already in devicetree as 0
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Lehman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-19 14:58 UTC by Jan Safranek
Modified: 2013-04-12 11:36 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-04-12 11:36:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Storage log (2.15 MB, text/x-log)
2012-11-19 14:58 UTC, Jan Safranek
no flags Details

Description Jan Safranek 2012-11-19 14:58:25 UTC
Created attachment 647819 [details]
Storage log

Description of problem:
I am using pyanaconda.storage as standalone storage module. On system with MD RAID device, storage.devicetree.populate fails with following traceback:

Traceback (most recent call last):
  File "anaconda_init.py", line 34, in <module>
    storage.devicetree.populate()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1850, in populate
    self._populate()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1959, in _populate
    self.addUdevDevice(dev)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1062, in addUdevDevice
    device = self.addUdevMDDevice(info)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 774, in addUdevMDDevice
    "devicetree as %s" % (name, device.name))
pyanaconda.storage.errors.DeviceTreeError: MD RAID device None already in devicetree as 0

Notice 'None' as value of 'name' variable in the output. I checked sources and my udev does not provide MD_DEVNAME property, i.e. udev_device_get_md_name returns None.

Version-Release number of selected component (if applicable):
anaconda-18.28-1.fc18.x86_64
systemd-195-6.fc18.x86_64

How reproducible:
always

Steps to Reproduce:
1. prepare RAID0: mdadm --create -l 0 -n 2 /dev/md0 /dev/sda1 /dev/sdb1
2. run the program below
  
Actual results:
traceback

Expected results:
initialized storage


Reproducer script:

from pyanaconda import anaconda_log
anaconda_log.init()

import pyanaconda.storage
import pyanaconda.platform
import os

os.system('udevadm control --env=ANACONDA=1')
os.system('udevadm trigger --subsystem-match block')
os.system('udevadm settle')
platform = pyanaconda.platform.getPlatform()
storage = pyanaconda.storage.Storage(platform=platform)
storage.devicetree.populate()

Comment 1 Jan Safranek 2013-04-12 11:36:20 UTC
Works well with python-blivet-0.10


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