Comment 5 for bug 1839529

Revision history for this message
Sherry Hurwitz (shurwitz) wrote :

It is similar in that a property is missing so the dictionary errors out but in this case the error is in probert in the storage.py in the blockdev probe. when all the devices in in the block subsystem are listed:

for device in context.list_devices(subsystem='block'):
    if device['MAJOR'] not in ["1", "7"]:
        attrs = udev_get_attributes(device)

The Samsung PM1725b is a dual port drive providing two access paths to the controller. It looks like this capability causes two device entries to be reported in the device list (wwid are the same):

Device('/sys/devices/pci0000:e0/0000:e0:03.3/0000:e2:00.0/nvme/nvme0/nvme0c33n1')
{'alignment_offset': '0', 'capability': '630', 'device': None, 'discard_alignment': '0', 'ext_range': '0', 'hidden': '1', 'inflight': ' 0 0', 'nguid': '34433930-4ba0-0316-0025-385900000003', 'nsid': '1', 'range': '0', 'removable': '0', 'ro': '0', 'size': '3125627568', 'stat': ' 592 0 18048 48 0 0 0 0 0 4 8', 'subsystem': 'block', 'uevent': 'DEVTYPE=disk', 'uuid': '34433930-4ba0-0316-0025-385900000003', 'wwid': 'eui.344339304ba003160025385900000003'}

Device('/sys/devices/virtual/nvme-subsystem/nvme-subsys0/nvme0n1')
{'alignment_offset': '0', 'bdi': None, 'capability': '50', 'dev': '259:1', 'device': None, 'discard_alignment': '0', 'ext_range': '256', 'hidden': '0', 'inflight': ' 0 0', 'nguid': '34433930-4ba0-0316-0025-385900000003', 'nsid': '1', 'range': '0', 'removable': '0','ro': '0', 'size': '3125627568', 'stat': ' 0 0 0 0 0 0 0 0 0 0 0', 'subsystem': 'block', 'uevent': 'MAJOR=259\nMINOR=1\nDEVNAME=nvme0n1\nDEVTYPE=disk', 'uuid': '34433930-4ba0-0316-0025-385900000003', 'wwid': 'eui.344339304ba003160025385900000003'}

The first entry has the hidden property set and is lacking the MAJOR/MINOR/DEVNAME properties. Maybe to fix the bug the probe function should skip any hidden entries and just use the non-hidden entry when there are duplicates?