Curtin Fails to Validate Storage Config with Crucial P1 NVMe drive

Bug #1841321 reported by Frieder Mueller
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
curtin (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Curtin Fails to Validate Storage Config with Crucial P1 NVMe drive

I encountered an error while attempting to install Ubuntu Server 18.04.3 LTS (HWE Kernel "5.0.0.-23-generic #24~18.04.1-Ubuntu") on a Curcial P1 M.2 NVMe drive.

Hardware is:
Asrock X470D4U
AMD Ryzen 7 3700X
Crucial P1 M2 NVMe 500 GB

Issue seems to be simmular to:

https://bugs.launchpad.net/ubuntu/+source/curtin/+bug/1840524

Extraction from logs (also attatched)
curtin:1156 Validation error: 'nvme.c0a9-313932354532304537423635-4354353030503153534438-00000001' is not valid under any of the given schemas in
{
 "id": "disk-nvme0n1",
 "path": "/dev/nvme0n1",
 "ptable": "gpt",
 "serial": "CT500P1SSD8_1925E20E7B65",
 "type": "disk",
 "wwn": "nvme.c0a9-313932354532304537423635-4354353030503153534438-00000001"
}
NoneType: None

Any ideas how I can "quickfix" this issue get Ubuntu 18.04.3 LTS installed soon?

Related branches

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

Thanks for filing the bug.

A "quickfix" would involve getting into the installer shell, manually patching the curtin python source on the instance, and then re-running the install. I've not poked around inside the installer so I'm not sure where the the subiquity snap keeps curtin. If you do find it then you can apply this change:

The line change needed for curtin to match the WWID of the nvme device:

diff --git a/curtin/block/schemas.py b/curtin/block/schemas.py
index fb7507d..96b3eb6 100644
--- a/curtin/block/schemas.py
+++ b/curtin/block/schemas.py
@@ -135,7 +135,8 @@ DISK = {
             'type': 'string',
             'oneOf': [
                 {'pattern': r'^0x(\d|[a-zA-Z])+'},
- {'pattern': r'^nvme\.(\d|[a-zA-Z]-)+'}],
+ {'pattern': r'^(nvme|eui)+\.(\d|[a-zA-Z]|\-)+'},
+ ],
         },
         'grub_device': {
             'type': ['boolean', 'integer'],

I'm putting but a branch to fix this pattern and when it his curtin master, when the subiquity snap is rebuilt and published, then the installer will pick up the fix as well.

Changed in curtin (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Ryan Harper (raharper)
Changed in curtin (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Frieder Mueller (friederm) wrote :

As a workaround, you can use mini.iso network installer to install 18.04 LTS until this is fixed.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit b36da8f7 to curtin on branch master.
To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=b36da8f7

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package curtin - 19.2-9-g38ce22b0-0ubuntu1

---------------
curtin (19.2-9-g38ce22b0-0ubuntu1) eoan; urgency=medium

  * New upstream snapshot.
    - vmtest: fix typo in EoanBcacheBasic test name
    - storage schema: Update nvme wwn regex to allow for nvme wwid format
      (LP: #1841321)
    - Allow EUI-64 formatted WWNs for disks and accept NVMe partition naming
      [Reed Slaby] (LP: #1840524)

 -- Ryan Harper <email address hidden> Wed, 28 Aug 2019 11:40:32 -0500

Changed in curtin (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Stewart Johnston (stooj) wrote :

I just tried this with the edge version of the subiquity snap but still encountered the bug.

Logs attached.

Revision history for this message
Ryan Harper (raharper) wrote :
Download full text (4.5 KiB)

@Stewart

Thanks for testing that out. Looking at the logs, the error you encountered doesn't appear to be the same. The logs show that the installation was started but failed while creating the first partition.

2019-10-18 08:16:10,379 DEBUG subiquitycore.controller.installprogress:350 curtin install cmd: ['/snap/subiquity/1295/usr/bin/python3', '-m', 'curtin', '--showtrace', '-c', '/var/log/installer/subiquity-curtin-install.conf', 'install']
2019-10-18 08:16:11,202 DEBUG subiquitycore.controller.installprogress:286 curtin_event received {'CURTIN_EVENT_TYPE': 'start', 'CURTIN_MESSAGE': 'curtin command install', 'CURTIN_NAME': 'cmd-install'}
2019-10-18 08:16:11,202 DEBUG subiquitycore.controller.installprogress:271 _install_event_start curtin command install
2019-10-18 08:16:11,203 DEBUG subiquitycore.controller.installprogress:286 curtin_event received {'CURTIN_EVENT_TYPE': 'start', 'CURTIN_MESSAGE': 'preparing for installation', 'CURTIN_NAME': 'cmd-install/stage-early'}
2019-10-18 08:16:11,203 DEBUG subiquitycore.controller.installprogress:271 _install_event_start preparing for installation
2019-10-18 08:16:11,203 DEBUG subiquitycore.controller.installprogress:286 curtin_event received {'CURTIN_MESSAGE': 'preparing for installation', 'CURTIN_NAME': 'cmd-install/stage-early', 'CURTIN_EVENT_TYPE': 'finish', 'CURTIN_RESULT': 'SUCCESS'}
2019-10-18 08:16:11,204 DEBUG subiquitycore.controller.installprogress:278 _install_event_finish ' '
2019-10-18 08:16:11,204 DEBUG subiquitycore.controller.installprogress:286 curtin_event received {'CURTIN_EVENT_TYPE': 'start', 'CURTIN_MESSAGE': 'configuring storage', 'CURTIN_NAME': 'cmd-install/stage-partitioning'}
2019-10-18 08:16:11,204 DEBUG subiquitycore.controller.installprogress:271 _install_event_start configuring storage
2019-10-18 08:16:11,204 DEBUG subiquitycore.controller.installprogress:286 curtin_event received {'CURTIN_EVENT_TYPE': 'start', 'CURTIN_MESSAGE': "running 'curtin block-meta simple'", 'CURTIN_NAME': 'cmd-install/stage-partitioning/builtin'}
2019-10-18 08:16:11,204 DEBUG subiquitycore.controller.installprogress:271 _install_event_start running 'curtin block-meta simple'
2019-10-18 08:16:11,953 DEBUG subiquitycore.controller.installprogress:286 curtin_event received {'CURTIN_EVENT_TYPE': 'start', 'CURTIN_MESSAGE': 'curtin command block-meta', 'CURTIN_NAME': 'cmd-install/stage-partitioning/builtin/cmd-block-meta'}
2019-10-18 08:16:11,953 DEBUG subiquitycore.controller.installprogress:271 _install_event_start curtin command block-meta
2019-10-18 08:16:22,015 DEBUG subiquitycore.controller.installprogress:286 curtin_event received {'CURTIN_EVENT_TYPE': 'start', 'CURTIN_MESSAGE': 'removing previous storage devices', 'CURTIN_NAME': 'cmd-install/stage-partitioning/builtin/cmd-block-meta/clear-holders'}
2019-10-18 08:16:22,015 DEBUG subiquitycore.controller.installprogress:271 _install_event_start removing previous storage devices
2019-10-18 08:16:23,453 DEBUG subiquitycore.controller.installprogress:286 curtin_event received {'CURTIN_EVENT_TYPE': 'finish', 'CURTIN_RESULT': 'SUCCESS', 'CURTIN_MESSAGE': 'removing previous storage devices', 'CURTIN_NAME': 'cmd-install/stage-partitioning/buil...

Read more...

Revision history for this message
Stewart Johnston (stooj) wrote :

@ryan I did, but the message was so generic I took it to be the same one as before.

Message was:

An error has occurred

curtin command install
  preparing for installation
  configuring storage
    running 'curtin block-meta simple'
      curtin command block-meta
        removing previous storage devices
        configuring disk: disk-nvme0n1

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

@stewart

I think you're seeing this bug:

https://bugs.launchpad.net/ubuntu/+source/curtin/+bug/1849322

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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