Comment 37 for bug 1869075

Revision history for this message
Ryan Harper (raharper) wrote :

Frank saw another variant of this with /dev/mapper/mpatha-part1, which fails in the same way if the on-disk symlink isn't present.

>>> clear_holders.gen_holders_tree('/dev/mapper/mpatha-part1')
{'device': '/sys/class/block/dm-1', 'dev_type': 'disk', 'name': 'dm-1', 'holders': [{'device': '/sys/class/block/dm-12', 'dev_type': 'disk', 'name': 'dm-12', 'holders': []}]}

>>> clear_holders.gen_holders_tree('/dev/mapper/mpathz-part1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/srv/rharper/curtin/curtin/block/clear_holders.py", line 464, in gen_holders_tree
    device = block.sys_block_path(device)
  File "/srv/rharper/curtin/curtin/block/__init__.py", line 141, in sys_block_path
    (parent, partnum) = get_blockdev_for_partition(devname, strict=strict)
  File "/srv/rharper/curtin/curtin/block/__init__.py", line 322, in get_blockdev_for_partition
    raise OSError("%s had no syspath (%s)" % (devpath, syspath))
OSError: /dev/mapper/mpathz-part1 had no syspath (/sys/class/block/mpathz-part1)