curtin cannot identify nvme namespaces because they share a serial number

Bug #1955511 reported by Clint Armstrong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
New
Undecided
Unassigned

Bug Description

An auto-install with the following config, curtin incorrectly identifies /dev/nvme0n3 as disk-nvme0n1. These are separate namespaces on the same nvme.

  storage:
    config:
    - grub_device: false
      id: disk-nvme0n1
      name: ''
      path: /dev/nvme0n1
      preserve: false
      ptable: gpt
      type: disk
    - grub_device: false
      id: disk-nvme0n3
      name: ''
      path: /dev/nvme0n3
      preserve: false
      type: disk
      wipe: superblock

When detecting devices, curtin seems to index devices by serial number, assuming that there will only be one device with a given serial number.

get_path_to_storage_volume for volume disk-nvme0n1({'ptable': 'gpt', 'serial': 'KCD6XLUL1T92_61P0A04BT5N8', 'path': '/dev/nvme0n1', 'preserve': False, 'name': '', 'grub_device': False, 'type': 'disk', 'id': 'disk-nvme0n1'})
Processing serial KCD6XLUL1T92_61P0A04BT5N8 via udev to KCD6XLUL1T92_61P0A04BT5N8
lookup_disks found: ['nvme-KCD6XLUL1T92_61P0A04BT5N8']
Running command ['udevadm', 'info', '--query=property', '--export', '/dev/nvme0n3'] with allowed return codes [0] (capture=True)
/dev/nvme0n3 is multipath device? False
Running command ['udevadm', 'info', '--query=property', '--export', '/dev/nvme0n3'] with allowed return codes [0] (capture=True)
/dev/nvme0n3 is multipath device member? False
block.lookup_disk() returning path /dev/nvme0n3
Running command ['partprobe', '/dev/nvme0n3'] with allowed return codes [0, 1] (capture=False)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.095
devsync happy - path /dev/nvme0n3 now exists
return volume path /dev/nvme0n3

ubuntu-server@ubuntu-server:~$ udevadm info --query=property --export /dev/nvme0n1
DEVPATH='/devices/pci0000:60/0000:60:03.1/0000:61:00.0/nvme/nvme0/nvme0n1'
DEVNAME='/dev/nvme0n1'
DEVTYPE='disk'
MAJOR='259'
MINOR='0'
SUBSYSTEM='block'
USEC_INITIALIZED='96702049'
MPATH_SBIN_PATH='/sbin'
DM_MULTIPATH_DEVICE_PATH='0'
ID_SERIAL_SHORT='61P0A04BT5N8'
ID_WWN='eui.00000000000000008ce38ee206ca9601'
ID_MODEL='KCD6XLUL1T92'
ID_REVISION='0105'
ID_SERIAL='KCD6XLUL1T92_61P0A04BT5N8'
ID_PATH='pci-0000:61:00.0-nvme-1'
ID_PATH_TAG='pci-0000_61_00_0-nvme-1'
DEVLINKS='/dev/disk/by-path/pci-0000:61:00.0-nvme-1 /dev/disk/by-id/nvme-KCD6XLUL1T92_61P0A04BT5N8 /dev/disk/by-id/nvme-eui.00000000000000008ce38ee206ca9601'
TAGS=':systemd:'

ubuntu-server@ubuntu-server:~$ udevadm info --query=property --export /dev/nvme0n3
DEVPATH='/devices/pci0000:60/0000:60:03.1/0000:61:00.0/nvme/nvme0/nvme0n3'
DEVNAME='/dev/nvme0n3'
DEVTYPE='disk'
MAJOR='259'
MINOR='2'
SUBSYSTEM='block'
USEC_INITIALIZED='96902330'
MPATH_SBIN_PATH='/sbin'
DM_MULTIPATH_DEVICE_PATH='0'
ID_SERIAL_SHORT='61P0A04BT5N8'
ID_WWN='eui.00000000000000008ce38ee206ca9603'
ID_MODEL='KCD6XLUL1T92'
ID_REVISION='0105'
ID_SERIAL='KCD6XLUL1T92_61P0A04BT5N8'
ID_PATH='pci-0000:61:00.0-nvme-3'
ID_PATH_TAG='pci-0000_61_00_0-nvme-3'
ID_PART_TABLE_UUID='61dd7dae-6c83-4108-b4d9-43a81442db39'
ID_PART_TABLE_TYPE='gpt'
DEVLINKS='/dev/disk/by-id/nvme-eui.00000000000000008ce38ee206ca9603 /dev/disk/by-path/pci-0000:61:00.0-nvme-3 /dev/disk/by-id/nvme-KCD6XLUL1T92_61P0A04BT5N8'
TAGS=':systemd:'

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.