Live-server installation fails to install on Samsung NVME

Bug #1839529 reported by Sherry Hurwitz
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
Incomplete
Undecided
Unassigned
probert (Ubuntu)
New
Undecided
Unassigned
subiquity (Ubuntu)
New
Undecided
Unassigned

Bug Description

Both the 18.04.2 and 19.04 live-server installer (subiquity) fail to install with on a Samsung NVME drive. The probe for drive properties fails with the following Traceback:
Traceback (most recent call last):
  File "/snap/subiquity/1093/lib/python3.6/site-packages/subiquity/controllers/filesystem.py", line 89, in _probed
    storage = fut.result()
  File "/snap/subiquity/1093/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/snap/subiquity/1093/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/snap/subiquity/1093/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/snap/subiquity/1093/lib/python3.6/site-packages/subiquity/controllers/filesystem.py", line 81, in _bg_probe
    return self.prober.get_storage(probe_types=probe_types)
  File "/snap/subiquity/1093/lib/python3.6/site-packages/subiquitycore/prober.py", line 69, in get_storage
    results = storage.probe(probe_types=probe_types)
  File "/snap/subiquity/1093/lib/python3.6/site-packages/probert/storage.py", line 181, in probe
    probed_data[ptype] = pfunc(context=self.context)
  File "/snap/subiquity/1093/lib/python3.6/site-packages/probert/filesystem.py", line 37, in probe
    if device['MAJOR'] not in ["1", "7"]:
  File "/snap/subiquity/1093/lib/python3.6/site-packages/pyudev/device/_device.py", line 957, in __getitem__
    return self.properties.__getitem__(prop)
  File "/snap/subiquity/1093/lib/python3.6/site-packages/pyudev/device/_device.py", line 1084, in __getitem__
    raise KeyError(prop)
KeyError: 'MAJOR'

Revision history for this message
Sherry Hurwitz (shurwitz) wrote :
Revision history for this message
Sherry Hurwitz (shurwitz) wrote :
Revision history for this message
Sherry Hurwitz (shurwitz) wrote :
Revision history for this message
Ryan Harper (raharper) wrote :
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?

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1839529] Re: Live-server installation fails to install on Samsung NVME

On Thu, Aug 15, 2019 at 11:56 AM Sherry Hurwitz <email address hidden>
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?
>

Thank you for the extra info from the device. I believe your suggestion is
the correct fix here.

>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1839529
>
> Title:
> Live-server installation fails to install on Samsung NVME
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1839529/+subscriptions
>

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I think this bug is fixed in the 20.04 ISO but am not completely sure...

Changed in subiquity:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.