curtin makes assumptions about partition names on all devices

Bug #1401190 reported by Tycho Andersen
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Undecided
Unassigned
curtin (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Medium
Unassigned
Vivid
Fix Released
Medium
Unassigned

Bug Description

== Begin SRU Template ==
[Description]
Installing to a system with a NVM Express card/block device will fail, showing something to the effect of:
  Could not stat /dev/nvme0n11 --- No such file or directory

This is due to curtin's fairly innocent understanding of device name paths.

The fix is both
  - better parsing of /sys to get information on device names and partitions that are on them.
  - specific handling of the very odd named '!ccis' devices.

[Impact]
Installation via curtin can not be done on these systems.

[Test Case]
Positive test case:
  Install via maas and curtin onto a system with a NVM Express card/block device.
  Successful installation and boot is success anything else is failure.

Negative test case:
  Install on a sytem without these devices and expect it to boot.

[Regression Potential]
Curtin's understanding of /dev/ and /sys generally improved. However, there are possibly still corner cases.
It seems unlikely that anything that worked before would fail with these changes.

[Other]
Related bugs:
 * bug 1263181: curtin discovers HP /dev/cciss/c0d0 incorrectly
 * bug 1471928: fail uefi install to nvme (NVM Express) device
== End SRU Template ==

When I do a curtin install via maas to some fancy flash hardware, i get:

no partition found /dev/nvme0n11
Could not stat /dev/nvme0n11 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
Unexpected error while running command.
Command: ['mkfs.ext4', '-q', '-L', 'cloudimg-rootfs', '/dev/nvme0n11']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'simple']
Exit code: 3
Reason: -
Stdout: "no partition found /dev/nvme0n11\nCould not stat /dev/nvme0n11 --- No such file or directory\n\nThe device apparently does not exist; did you specify it correctly?\nUnexpected error while running command.\nCommand: ['mkfs.ext4', '-q', '-L', 'cloudimg-rootfs', '/dev/nvme0n11']\nExit code: 1\nReason: -\nStdout: ''\nStderr: ''\n"
Stderr: ''

smoser: what i think is happening is this
a.) curtin chooses nvme0n1 as the device to install on
b.) curtin partitions nvme0n1
c.) curtin tries to mkfs on nvme0n11 (appending a '1' to the device name)
when actually the name is 'nvme0n1p1' probably. device names are stupidly inconsistently named.
and curtin is admittedly very stupid in its assumptions too

This patch fixes it (for me, for this device):

http://paste.ubuntu.com/9355100/

Related bugs:
  * bug 1263181 : curtin discovers HP /dev/cciss/c0d0 incorrectly

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

We just got the same on new SSD drives.

tags: added: landscape
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The branch added to https://bugs.launchpad.net/curtin/+bug/1263181 worked for me for this case here.

tags: added: canonical-bootstack
Scott Moser (smoser)
Changed in curtin (Ubuntu):
status: New → Fix Released
Changed in curtin:
status: New → Fix Committed
Changed in curtin (Ubuntu Trusty):
importance: Undecided → Medium
status: New → Confirmed
Changed in curtin (Ubuntu Vivid):
status: New → Confirmed
importance: Undecided → Medium
description: updated
Scott Moser (smoser)
description: updated
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Tycho, or anyone else affected,

Accepted curtin into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/curtin/0.1.0~bzr221-0ubuntu1~14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in curtin (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Tycho, or anyone else affected,

Accepted curtin into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/curtin/0.1.0~bzr221-0ubuntu1~14.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in curtin (Ubuntu Vivid):
status: Confirmed → Fix Committed
Scott Moser (smoser)
description: updated
Revision history for this message
Scott Moser (smoser) wrote :

We've successfully deployed using latest curtin to the systems that were causing problems (primarily nvme systems and ccis systems).

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package curtin - 0.1.0~bzr221-0ubuntu1~14.04.1

---------------
curtin (0.1.0~bzr221-0ubuntu1~14.04.1) trusty-proposed; urgency=medium

  * New upstream snapshot.
    - support installation to multipath devices. (LP: #1371634)
    - know that kernel version 4.2.0 maps to linux-generic-lts-wily
    - support install to arm64 systems that use UEFI for boot (LP: #1447834)
    - fix remaining usage of 'lsblk --out' rather than 'lsblk --output'
      (LP: #1386275)
    - retry 'apt-get update' on failure to avoid transient failures
      (LP: #1403133)
    - run udevadm settle before unmounting /dev in a target to avoid transient
      failures (LP: #1462139)
    - fixes and additions to tools used in development.
    - Add --no-nvram to the grub-install command for UEFI. (LP: #1311827)
    - avoid race condition and transient failure due busy device in mkfs
      (LP: #1443542)
    - improvements to device and partition naming code which allow installation
      devices with HP cciss smart array drives(LP: #1401190, #1263181)
    - do not consider devices < 1G as installable targets
  * debian/README.source fix doc on how to create new upstream snapshots

 -- Scott Moser <email address hidden> Wed, 24 Jun 2015 14:31:14 -0400

Changed in curtin (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for curtin has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package curtin - 0.1.0~bzr221-0ubuntu1~14.10.1

---------------
curtin (0.1.0~bzr221-0ubuntu1~14.10.1) vivid-proposed; urgency=medium

  * New upstream snapshot.
    - support installation to multipath devices. (LP: #1371634)
    - know that kernel version 4.2.0 maps to linux-generic-lts-wily
    - support install to arm64 systems that use UEFI for boot (LP: #1447834)
    - fix remaining usage of 'lsblk --out' rather than 'lsblk --output'
      (LP: #1386275)
    - retry 'apt-get update' on failure to avoid transient failures
      (LP: #1403133)
    - run udevadm settle before unmounting /dev in a target to avoid transient
      failures (LP: #1462139)
    - fixes and additions to tools used in development.
    - Add --no-nvram to the grub-install command for UEFI. (LP: #1311827)
    - avoid race condition and transient failure due busy device in mkfs
      (LP: #1443542)
    - improvements to device and partition naming code which allow installation
      devices with HP cciss smart array drives(LP: #1401190, #1263181)
    - do not consider devices < 1G as installable targets
  * debian/README.source fix doc on how to create new upstream snapshots

 -- Scott Moser <email address hidden> Wed, 24 Jun 2015 16:12:59 -0400

Changed in curtin (Ubuntu Vivid):
status: Fix Committed → Fix Released
Revision history for this message
Rob Sanderson (robsanderson) wrote :

Hi,

I'm still seeing this issue on Xenial.

root@maas1:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu Xenial Xerus (development branch)"
root@maas1:~# uname -a
Linux maas1 4.4.0-6-generic #21-Ubuntu SMP Tue Feb 16 20:32:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@maas1:~# dpkg -l|grep curtin
ii curtin-common 0.1.0~bzr359-0ubuntu1 all Library and tools for curtin installer
ii python3-curtin 0.1.0~bzr359-0ubuntu1 all Library and tools for curtin installer

I have tried with the default curtin_userdata and have also tried:

partitioning_commands:
 builtin: curtin block-meta custom

storage:
    version: 1
    config:
      - id: nvme0n1
        type: disk
        ptable: msdos
      - id: nvme0n1p1
        type: partition
        number: 1
        size: 128GB
        device: nvme0n1
        flag: boot
      - id: nvme0n1p1_root
        type: format
        fstype: ext4
        volume: nvme0n1p1
      - id: nvme0n1p1_mount
        type: mount
        path: /
        device: nvme0n1p1_root

The error is as follows:

+ exec curtin --install-deps install --config=configs/config-000.cfg --config=configs/config-001.cfg --config=configs/config-002.cfg --config=configs/config-003.cfg --config=configs/config-004.cfg http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz
Error: /dev/sda: unrecognised disk label
Error: /dev/sda: unrecognised disk label
Error: /dev/sdb: unrecognised disk label
Error: /dev/sdb: unrecognised disk label
Error: /dev/sdc: unrecognised disk label
Error: /dev/sdc: unrecognised disk label
An error occured handling 'nvme0n1-part1_format': ValueError - '/dev/nvme0n11': no such file or directory
'/dev/nvme0n11': no such file or directory
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: "Error: /dev/sda: unrecognised disk label\nError: /dev/sda: unrecognised disk label\nError: /dev/sdb: unrecognised disk label\nError: /dev/sdb: unrecognised disk label\nError: /dev/sdc: unrecognised disk label\nError: /dev/sdc: unrecognised disk label\nAn error occured handling 'nvme0n1-part1_format': ValueError - '/dev/nvme0n11': no such file or directory\n'/dev/nvme0n11': no such file or directory\n"
Stderr: ''
Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: "Error: /dev/sda: unrecognised disk label\nError: /dev/sda: unrecognised disk label\nError: /dev/sdb: unrecognised disk label\nError: /dev/sdb: unrecognised disk label\nError: /dev/sdc: unrecognised disk label\nError: /dev/sdc: unrecognised disk label\nAn error occured handling 'nvme0n1-part1_format': ValueError - '/dev/nvme0n11': no such file or directory\n'/dev/nvme0n11': no such file or directory\n"
Stderr: ''

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1401190] Re: curtin makes assumptions about partition names on all devices
Download full text (3.7 KiB)

On Sat, Mar 5, 2016 at 3:56 AM, Rob Sanderson <email address hidden>
wrote:

> Hi,
>
> I'm still seeing this issue on Xenial.
>
> root@maas1:~# cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=16.04
> DISTRIB_CODENAME=xenial
> DISTRIB_DESCRIPTION="Ubuntu Xenial Xerus (development branch)"
> root@maas1:~# uname -a
> Linux maas1 4.4.0-6-generic #21-Ubuntu SMP Tue Feb 16 20:32:27 UTC 2016
> x86_64 x86_64 x86_64 GNU/Linux
> root@maas1:~# dpkg -l|grep curtin
> ii curtin-common 0.1.0~bzr359-0ubuntu1 all
> Library and tools for curtin installer
> ii python3-curtin 0.1.0~bzr359-0ubuntu1 all
> Library and tools for curtin installer
>
> I have tried with the default curtin_userdata and have also tried:
>
> partitioning_commands:
> builtin: curtin block-meta custom
>
> storage:
> version: 1
> config:
> - id: nvme0n1
> type: disk
> ptable: msdos
>

If you don't specify a 'serial': or 'path' then curtin will attempt to
deduce the path via the id.

Can you try adding:

 path: /dev/nvme0

If that is indeed the path to the device.

> - id: nvme0n1p1
> type: partition
> number: 1
> size: 128GB
> device: nvme0n1
> flag: boot
> - id: nvme0n1p1_root
> type: format
> fstype: ext4
> volume: nvme0n1p1
> - id: nvme0n1p1_mount
> type: mount
> path: /
> device: nvme0n1p1_root
>
> The error is as follows:
>
> + exec curtin --install-deps install --config=configs/config-000.cfg
> --config=configs/config-001.cfg --config=configs/config-002.cfg
> --config=configs/config-003.cfg --config=configs/config-004.cfg
> http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz
> Error: /dev/sda: unrecognised disk label
> Error: /dev/sda: unrecognised disk label
> Error: /dev/sdb: unrecognised disk label
> Error: /dev/sdb: unrecognised disk label
> Error: /dev/sdc: unrecognised disk label
> Error: /dev/sdc: unrecognised disk label
> An error occured handling 'nvme0n1-part1_format': ValueError -
> '/dev/nvme0n11': no such file or directory
> '/dev/nvme0n11': no such file or directory
> Installation failed with exception: Unexpected error while running command.
> Command: ['curtin', 'block-meta', 'custom']
> Exit code: 3
> Reason: -
> Stdout: "Error: /dev/sda: unrecognised disk label\nError: /dev/sda:
> unrecognised disk label\nError: /dev/sdb: unrecognised disk label\nError:
> /dev/sdb: unrecognised disk label\nError: /dev/sdc: unrecognised disk
> label\nError: /dev/sdc: unrecognised disk label\nAn error occured handling
> 'nvme0n1-part1_format': ValueError - '/dev/nvme0n11': no such file or
> directory\n'/dev/nvme0n11': no such file or directory\n"
> Stderr: ''
> Unexpected error while running command.
> Command: ['curtin', 'block-meta', 'custom']
> Exit code: 3
> Reason: -
> Stdout: "Error: /dev/sda: unrecognised disk label\nError: /dev/sda:
> unrecognised disk label\nError: /dev/sdb: unrecognised disk label\nError:
> /dev/sdb: unrecognised disk label\nError: /dev/sdc: unrecognised disk
> label\nError: /dev/sdc: unrecognised disk label\nAn err...

Read more...

Revision history for this message
Rob Sanderson (robsanderson) wrote :
Download full text (7.4 KiB)

Hi, thanks for the reply.

Specifying the path doesn't appear to help. I have tried the following:

* Commissioned a new server

* Set disk config in web ui:

    Used disks and partitions

    Name Model Serial BootDevice typeUsed for
    nvme0n1PhysicalGPT partitioned with 1 partition
    nvme0n1-part1Partitionext4 formatted filesystem mounted at /

  ** Without these settings I am unable to deploy due to no disk configuration. **

* Edited /etc/maas/preseeds/curtin_userdata (After early but before late commands)

    partitioning_commands:
      builtin: [curtin, block-meta, custom]
    storage:
      config:
      - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type: disk, wipe: superblock}
      - {device: nvme0n1, id: nvme0n1p1, name: nvme0n1p1, number: 1, offset: 4194304B, size: 128026935296B, type: partition, uuid: e66f2d9d-963a-4cb9-b2b5-472d491e768b, wipe: superblock}
      - {fstype: ext4, id: nvme0n1p1_format, label: '', type: format, path: /dev/nvme0n1p1, uuid: 6a47f95c-40b6-478a-aefa-ca84a509d877, volume: nvme0n1p1}
      version: 1

** Deployment fails **

If I connect to the failed server I can manually run the commands to try and see what happened.

* ssh node

* /var/lib/cloud/instance/scripts/part-001

* cd curtin

* cat configs/config-002.cfg
partitioning_commands:
  builtin: [curtin, block-meta, custom]
storage:
  config:
  - {grub_device: true, id: sda, model: ST2000DM001-1CH1, name: sda, ptable: msdos,
    serial: Z3409QB2, type: disk, wipe: superblock}
  - {id: sdb, model: ST2000DM001-1CH1, name: sdb, serial: Z3409S81, type: disk, wipe: superblock}
  - {id: sdc, model: Samsung SSD 840, name: sdc, serial: S1D9NSAFB19195M, type: disk,
    wipe: superblock}
  - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type: disk, wipe: superblock}
  - {device: nvme0n1, id: nvme0n1-part1, name: nvme0n1-part1, number: 1, offset: 4194304B,
    size: 128026935296B, type: partition, uuid: e66f2d9d-963a-4cb9-b2b5-472d491e768b,
    wipe: superblock}
  - {fstype: ext4, id: nvme0n1-part1_format, label: '', type: format, uuid: 6a47f95c-40b6-478a-aefa-ca84a509d877,
    volume: nvme0n1-part1}
  - {device: nvme0n1-part1_format, id: nvme0n1-part1_mount, path: /, type: mount}
  version: 1

** The above config appears to have ignored my curtin_userdata settings entirely. **

* cat << EOF > configs/config-002.cfg
> partitioning_commands:
> builtin: [curtin, block-meta, custom]
> storage:
> config:
> - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type: disk, wipe: superblock}
> - {device: nvme0n1, id: nvme0n1p1, name: nvme0n1p1, number: 1, offset: 4194304B, size: 128026935296B, type: partition, wipe: superblock}
> - {fstype: ext4, id: nvme0n1p1_format, label: '', type: format, path: /dev/nvme0n1p1, volume: nvme0n1p1}
> version: 1
> EOF

* bin/curtin --showtrace --install-deps install --config=configs/config-002.cfg http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz
Creating new GPT entries.
The operation has completed successfully.
The operation has completed successfully.
An error occured handling 'nvme0n1p1_format': ValueError - '/dev/nvme0n11': no such file or...

Read more...

Revision history for this message
Rob Sanderson (robsanderson) wrote :

ls -la /dev/nvme0*
crw------- 1 root root 10, 57 Mar 6 21:10 /dev/nvme0
brw-rw---- 1 root disk 259, 0 Mar 6 21:44 /dev/nvme0n1
brw-rw---- 1 root disk 259, 1 Mar 6 21:44 /dev/nvme0n1p1

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

Yeah, looks like the mkfs code is expecting you to include label: 'some
label' in the format dictionary.
Can you try injecting a label into the format dictionary:

 - {fstype: ext4, id: nvme0n1-part1_format, label: 'SOME_LABEL_HERE', type:
format, uuid: 6a47f95c-40b6-478a-aefa-ca84a509d877,
    volume: nvme0n1-part1}

This is a bug in curtin as label's aren't required.

On Sun, Mar 6, 2016 at 3:58 PM, Rob Sanderson <email address hidden>
wrote:

> ls -la /dev/nvme0*
> crw------- 1 root root 10, 57 Mar 6 21:10 /dev/nvme0
> brw-rw---- 1 root disk 259, 0 Mar 6 21:44 /dev/nvme0n1
> brw-rw---- 1 root disk 259, 1 Mar 6 21:44 /dev/nvme0n1p1
>
> --
> You received this bug notification because you are subscribed to curtin
> in Ubuntu.
> Matching subscriptions: curtin-bugs, curtin-bugs-all
> https://bugs.launchpad.net/bugs/1401190
>
> Title:
> curtin makes assumptions about partition names on all devices
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/curtin/+bug/1401190/+subscriptions
>

Revision history for this message
Rob Sanderson (robsanderson) wrote :
Download full text (11.2 KiB)

Hi Ryan,

I have tried that but no luck.

Config using curtin defaults:
----------------------------------------------------------------------------------------------------------
cat configs/config-002.cfg

partitioning_commands:
  builtin: [curtin, block-meta, custom]
storage:
  config:
  - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type: disk, wipe: superblock}
  - {device: nvme0n1, id: nvme0n1-part1, name: nvme0n1-part1, number: 1, offset: 4194304B, size: 128026935296B, type: partition, uuid: e66f2d9d-963a-4cb9-b2b5-472d491e768b, wipe: superblock}
  - {fstype: ext4, id: nvme0n1-part1_format, label: 'rootfs', type: format, uuid: 6a47f95c-40b6-478a-aefa-ca84a509d877, volume: nvme0n1-part1, path: /dev/nvme0n1p1}
  - {device: nvme0n1-part1_format, id: nvme0n1-part1_mount, path: /, type: mount}
  version: 1

bin/curtin --showtrace --install-deps install --config=configs/config-002.cfg

http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz
Creating new GPT entries.
The operation has completed successfully.
The operation has completed successfully.
An error occured handling 'nvme0n1-part1_format': ValueError - '/dev/nvme0n11': no such file or directory
Traceback (most recent call last):
  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
    ret = args.func(args)
  File "curtin/commands/block_meta.py", line 62, in block_meta
    meta_custom(args)
  File "curtin/commands/block_meta.py", line 1083, in meta_custom
    handler(command, storage_config_dict)
  File "curtin/commands/block_meta.py", line 672, in format_handler
    mkfs.mkfs_from_config(volume_path, info)
  File "curtin/block/mkfs.py", line 207, in mkfs_from_config
    label=info.get('label'))
  File "curtin/block/mkfs.py", line 145, in mkfs
    raise ValueError("'%s': no such file or directory" % path)
ValueError: '/dev/nvme0n11': no such file or directory
'/dev/nvme0n11': no such file or directory
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: 'Creating new GPT entries.\nThe operation has completed successfully.\nThe operation has completed successfully.\nAn error occured handling \'nvme0n1-part1_format\': ValueError - \'/dev/nvme0n11\': no such file or directory\nTraceback (most recent call last):\n File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main\n ret = args.func(args)\n File "curtin/commands/block_meta.py", line 62, in block_meta\n meta_custom(args)\n File "curtin/commands/block_meta.py", line 1083, in meta_custom\n handler(command, storage_config_dict)\n File "curtin/commands/block_meta.py", line 672, in format_handler\n mkfs.mkfs_from_config(volume_path, info)\n File "curtin/block/mkfs.py", line 207, in mkfs_from_config\n label=info.get(\'label\'))\n File "curtin/block/mkfs.py", line 145, in mkfs\n raise ValueError("\'%s\': no such file or directory" % path)\nValueError: \'/dev/nvme0n11\': no such file or directory\n\'/dev/nvme0n11\': no such file or directory\n'
Stderr: ''
Traceback (most recent call last):
  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in...

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

OK; thanks. I need to work with nvme devices on Xenial; it looks like the
storage naming rules for partitions are different for NVME devices (p1, p2,
p3) versus other disks (1, 2, 3 4);

On Mon, Mar 7, 2016 at 12:54 PM, Rob Sanderson <email address hidden>
wrote:

> Hi Ryan,
>
> I have tried that but no luck.
>
> Config using curtin defaults:
>
> ----------------------------------------------------------------------------------------------------------
> cat configs/config-002.cfg
>
> partitioning_commands:
> builtin: [curtin, block-meta, custom]
> storage:
> config:
> - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type:
> disk, wipe: superblock}
> - {device: nvme0n1, id: nvme0n1-part1, name: nvme0n1-part1, number: 1,
> offset: 4194304B, size: 128026935296B, type: partition, uuid:
> e66f2d9d-963a-4cb9-b2b5-472d491e768b, wipe: superblock}
> - {fstype: ext4, id: nvme0n1-part1_format, label: 'rootfs', type:
> format, uuid: 6a47f95c-40b6-478a-aefa-ca84a509d877, volume: nvme0n1-part1,
> path: /dev/nvme0n1p1}
> - {device: nvme0n1-part1_format, id: nvme0n1-part1_mount, path: /, type:
> mount}
> version: 1
>
> bin/curtin --showtrace --install-deps install
> --config=configs/config-002.cfg
>
> http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz
> Creating new GPT entries.
> The operation has completed successfully.
> The operation has completed successfully.
> An error occured handling 'nvme0n1-part1_format': ValueError -
> '/dev/nvme0n11': no such file or directory
> Traceback (most recent call last):
> File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
> ret = args.func(args)
> File "curtin/commands/block_meta.py", line 62, in block_meta
> meta_custom(args)
> File "curtin/commands/block_meta.py", line 1083, in meta_custom
> handler(command, storage_config_dict)
> File "curtin/commands/block_meta.py", line 672, in format_handler
> mkfs.mkfs_from_config(volume_path, info)
> File "curtin/block/mkfs.py", line 207, in mkfs_from_config
> label=info.get('label'))
> File "curtin/block/mkfs.py", line 145, in mkfs
> raise ValueError("'%s': no such file or directory" % path)
> ValueError: '/dev/nvme0n11': no such file or directory
> '/dev/nvme0n11': no such file or directory
> Installation failed with exception: Unexpected error while running command.
> Command: ['curtin', 'block-meta', 'custom']
> Exit code: 3
> Reason: -
> Stdout: 'Creating new GPT entries.\nThe operation has completed
> successfully.\nThe operation has completed successfully.\nAn error occured
> handling \'nvme0n1-part1_format\': ValueError - \'/dev/nvme0n11\': no such
> file or directory\nTraceback (most recent call last):\n File
> "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main\n ret =
> args.func(args)\n File "curtin/commands/block_meta.py", line 62, in
> block_meta\n meta_custom(args)\n File "curtin/commands/block_meta.py",
> line 1083, in meta_custom\n handler(command, storage_config_dict)\n
> File "curtin/commands/block_meta.py", line 672, in format_handler\n
> mkfs.mkfs_from_config(volume_path, info)\n File "curtin/block/mkfs.py",
> line ...

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

One more try, lets specify the partition "number" as 'p1' instead.

- {device: nvme0n1, id: nvme0n1p1, name: nvme0n1p1, number: 'p1', offset:
4194304B, size: 128026935296B, type: partition, uuid:
e66f2d9d-963a-4cb9-b2b5-472d491e768b, wipe: superblock}

On Mon, Mar 7, 2016 at 1:24 PM, Ryan Harper <email address hidden>
wrote:

> OK; thanks. I need to work with nvme devices on Xenial; it looks like
> the storage naming rules for partitions are different for NVME devices (p1,
> p2, p3) versus other disks (1, 2, 3 4);
>
>
> On Mon, Mar 7, 2016 at 12:54 PM, Rob Sanderson <<email address hidden>
> > wrote:
>
>> Hi Ryan,
>>
>> I have tried that but no luck.
>>
>> Config using curtin defaults:
>>
>> ----------------------------------------------------------------------------------------------------------
>> cat configs/config-002.cfg
>>
>> partitioning_commands:
>> builtin: [curtin, block-meta, custom]
>> storage:
>> config:
>> - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type:
>> disk, wipe: superblock}
>> - {device: nvme0n1, id: nvme0n1-part1, name: nvme0n1-part1, number: 1,
>> offset: 4194304B, size: 128026935296B, type: partition, uuid:
>> e66f2d9d-963a-4cb9-b2b5-472d491e768b, wipe: superblock}
>> - {fstype: ext4, id: nvme0n1-part1_format, label: 'rootfs', type:
>> format, uuid: 6a47f95c-40b6-478a-aefa-ca84a509d877, volume: nvme0n1-part1,
>> path: /dev/nvme0n1p1}
>> - {device: nvme0n1-part1_format, id: nvme0n1-part1_mount, path: /,
>> type: mount}
>> version: 1
>>
>> bin/curtin --showtrace --install-deps install
>> --config=configs/config-002.cfg
>>
>>
>> http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz
>> Creating new GPT entries.
>> The operation has completed successfully.
>> The operation has completed successfully.
>> An error occured handling 'nvme0n1-part1_format': ValueError -
>> '/dev/nvme0n11': no such file or directory
>> Traceback (most recent call last):
>> File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
>> ret = args.func(args)
>> File "curtin/commands/block_meta.py", line 62, in block_meta
>> meta_custom(args)
>> File "curtin/commands/block_meta.py", line 1083, in meta_custom
>> handler(command, storage_config_dict)
>> File "curtin/commands/block_meta.py", line 672, in format_handler
>> mkfs.mkfs_from_config(volume_path, info)
>> File "curtin/block/mkfs.py", line 207, in mkfs_from_config
>> label=info.get('label'))
>> File "curtin/block/mkfs.py", line 145, in mkfs
>> raise ValueError("'%s': no such file or directory" % path)
>> ValueError: '/dev/nvme0n11': no such file or directory
>> '/dev/nvme0n11': no such file or directory
>> Installation failed with exception: Unexpected error while running
>> command.
>> Command: ['curtin', 'block-meta', 'custom']
>> Exit code: 3
>> Reason: -
>> Stdout: 'Creating new GPT entries.\nThe operation has completed
>> successfully.\nThe operation has completed successfully.\nAn error occured
>> handling \'nvme0n1-part1_format\': ValueError - \'/dev/nvme0n11\': no such
>> file or directory\nTraceback (most recent call last):\n File
>> "/home/ubuntu/curtin/curtin/commands/...

Revision history for this message
Rob Sanderson (robsanderson) wrote :

Hi Ryan,

Thanks, let me know if you need me to make any changes or run through any tests.

A quick question if I may: How is the config generated when the node is deploying? I have found that storage config in curtin_userdata on the maas server appears to be ignored or clobbered e.g.

If I execute: /var/lib/cloud/instance/scripts/part-001 # fails due to bug
cd curtin

cat configs/config-000.cfg # I see the storage config I have set on the maas server in curtin_userdata

#cloud-config
...
...

partitioning_commands:
  builtin: [curtin, block-meta, custom]
storage:
  config:
  - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type: disk, wipe: superblock}
  - {device: nvme0n1, id: nvme0n1p1, name: nvme0n1p1, number: 1, offset: 4194304B, size: 128026935296B, type: partition, wipe: superblock}
  - {fstype: ext4, id: nvme0n1p1_format, label: 'rootfs', type: format, path: /dev/nvme0n1p1, volume: nvme0n1p1}
  version: 1

cat configs/config-002.cfg # appears to be the device(s) that are found during commissioning

partitioning_commands:
  builtin: [curtin, block-meta, custom]
storage:
  config:
  - {grub_device: true, id: sdc, model: Samsung SSD 840, name: sdc, ptable: gpt, serial: S1D9NSAFB19195M,
    type: disk, wipe: superblock}
  - {device: sdc, id: sdc-part1, name: sdc-part1, number: 1, offset: 4194304B, size: 1000198897664B,
    type: partition, uuid: 8bcce503-ad8f-495e-a158-669829585db2, wipe: superblock}
  - {fstype: ext4, id: sdc-part1_format, label: '', type: format, uuid: 0195af9d-764d-4b35-8e53-07573aa4c057,
    volume: sdc-part1}
  - {device: sdc-part1_format, id: sdc-part1_mount, path: /, type: mount}
  version: 1
...
...
----

I was trying to test an install to one of the other disks which also failed.

I had to remove the nvme device and 2 other devices from the web ui as configs/config-002.cfg had every disk listed, including the nvme device which I had specified in curtin_userdata. The config data is that from commissioning.

I also noted that despite me selecting a different boot device that it was still trying to install grub to sda.

Does this sound like another bug with curtin or should I raise it with the maas project?

Cheers,
Rob

Revision history for this message
Rob Sanderson (robsanderson) wrote :

OK, just recommissioning the node so I can retest. 20 mins!

Revision history for this message
Rob Sanderson (robsanderson) wrote :
Download full text (4.6 KiB)

Hi Ryan,

Here you go

/var/lib/cloud/instance/scripts/part-001 extract

cd curtin

cat configs/config-000.cfg
#cloud-config

...
partitioning_commands:
  builtin: [curtin, block-meta, custom]
storage:
  config:
  - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type: disk, wipe: superblock}
  - {device: nvme0n1, id: nvme0n1p1, name: nvme0n1p1, number: 'p1', offset: 4194304B, size: 128026935296B, type: partition, wipe: superblock}
  - {fstype: ext4, id: nvme0n1p1_format, label: 'rootfs', type: format, path: /dev/nvme0n1p1, volume: nvme0n1p1}
  version: 1

bin/curtin --showtrace --install-deps install --config=configs/config-000.cfg http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz
Creating new GPT entries.
The operation has completed successfully.
An error occured handling 'nvme0n1p1': IOError - [Errno 2] No such file or directory: '/sys/block/nvme0n1/nvme0n1None/size'
Traceback (most recent call last):
  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
    ret = args.func(args)
  File "curtin/commands/block_meta.py", line 62, in block_meta
    meta_custom(args)
  File "curtin/commands/block_meta.py", line 1083, in meta_custom
    handler(command, storage_config_dict)
  File "curtin/commands/block_meta.py", line 565, in partition_handler
    with open(os.path.join(previous_partition, "size"), "r") as fp:
IOError: [Errno 2] No such file or directory: '/sys/block/nvme0n1/nvme0n1None/size'
[Errno 2] No such file or directory: '/sys/block/nvme0n1/nvme0n1None/size'
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: 'Creating new GPT entries.\nThe operation has completed successfully.\nAn error occured handling \'nvme0n1p1\': IOError - [Errno 2] No such file or directory: \'/sys/block/nvme0n1/nvme0n1None/size\'\nTraceback (most recent call last):\n File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main\n ret = args.func(args)\n File "curtin/commands/block_meta.py", line 62, in block_meta\n meta_custom(args)\n File "curtin/commands/block_meta.py", line 1083, in meta_custom\n handler(command, storage_config_dict)\n File "curtin/commands/block_meta.py", line 565, in partition_handler\n with open(os.path.join(previous_partition, "size"), "r") as fp:\nIOError: [Errno 2] No such file or directory: \'/sys/block/nvme0n1/nvme0n1None/size\'\n[Errno 2] No such file or directory: \'/sys/block/nvme0n1/nvme0n1None/size\'\n'
Stderr: ''
Traceback (most recent call last):
  File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
    ret = args.func(args)
  File "curtin/commands/install.py", line 399, in cmd_install
    raise e
ProcessExecutionError: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: 'Creating new GPT entries.\nThe operation has completed successfully.\nAn error occured handling \'nvme0n1p1\': IOError - [Errno 2] No such file or directory: \'/sys/block/nvme0n1/nvme0n1None/size\'\nTraceback (most recent call last):\n File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in m...

Read more...

Revision history for this message
Rob Sanderson (robsanderson) wrote :

Also worth noting that curtin runs:

curtin --install-deps install --config=configs/config-000.cfg --config=configs/config-001.cfg --config=configs/config-002.cfg --config=configs/config-003.cfg --config=configs/config-004.cfg http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz

and config-002.cfg contains the nvme device (unrelated to the above but looks like it will cause problems in the next step i.e. once we can get curtin to select the correct partition)

cat configs/config-002.cfg
partitioning_commands:
  builtin: [curtin, block-meta, custom]
storage:
  config:
  - {id: sdc, model: Samsung SSD 840, name: sdc, serial: S1D9NSAFB19195M, type: disk,
    wipe: superblock}
  - {id: sda, model: ST2000DM001-1CH1, name: sda, serial: Z3409QB2, type: disk, wipe: superblock}
  - {id: sdb, model: ST2000DM001-1CH1, name: sdb, serial: Z3409S81, type: disk, wipe: superblock}
  - {grub_device: true, id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: msdos,
    type: disk, wipe: superblock}
  - {device: nvme0n1, id: nvme0n1-part1, name: nvme0n1-part1, number: 1, offset: 4194304B,
    size: 128026935296B, type: partition, uuid: edf17540-d929-41cc-85de-c4df78802b8d,
    wipe: superblock}
  - {fstype: ext4, id: nvme0n1-part1_format, label: '', type: format, uuid: ce3b35c2-48ee-4d6f-9b20-0ff9642b2961,
    volume: nvme0n1-part1}
  - {device: nvme0n1-part1_format, id: nvme0n1-part1_mount, path: /, type: mount}
  version: 1

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

On Mon, Mar 7, 2016 at 1:50 PM, Rob Sanderson <email address hidden>
wrote:

> Hi Ryan,
>
> Thanks, let me know if you need me to make any changes or run through
> any tests.
>
> A quick question if I may: How is the config generated when the node is
> deploying? I have found that storage config in curtin_userdata on the
> maas server appears to be ignored or clobbered e.g.
>

If you're using maas 1.8, or maas 1.9; maas itself is generating storage
configuration

https://maas.ubuntu.com/docs/storage.html#storage

Ideally you don't need to inject your own custom partitioning/storage
config; you
configure maas in the UI and it emits storage configuration to curtin.

It's not clear to me how you're combining your own user-data with what MaaS
supplies.

> If I execute: /var/lib/cloud/instance/scripts/part-001 # fails due to bug
> cd curtin

> cat configs/config-000.cfg # I see the storage config I have set on the
> maas server in curtin_userdata
>
> #cloud-config
> ...
> ...
>
> partitioning_commands:
> builtin: [curtin, block-meta, custom]
> storage:
> config:
> - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type:
> disk, wipe: superblock}
> - {device: nvme0n1, id: nvme0n1p1, name: nvme0n1p1, number: 1, offset:
> 4194304B, size: 128026935296B, type: partition, wipe: superblock}
> - {fstype: ext4, id: nvme0n1p1_format, label: 'rootfs', type: format,
> path: /dev/nvme0n1p1, volume: nvme0n1p1}
> version: 1
>
> cat configs/config-002.cfg # appears to be the device(s) that are found
> during commissioning
>
> partitioning_commands:
> builtin: [curtin, block-meta, custom]
> storage:
> config:
> - {grub_device: true, id: sdc, model: Samsung SSD 840, name: sdc,
> ptable: gpt, serial: S1D9NSAFB19195M,
> type: disk, wipe: superblock}
> - {device: sdc, id: sdc-part1, name: sdc-part1, number: 1, offset:
> 4194304B, size: 1000198897664B,
> type: partition, uuid: 8bcce503-ad8f-495e-a158-669829585db2, wipe:
> superblock}
> - {fstype: ext4, id: sdc-part1_format, label: '', type: format, uuid:
> 0195af9d-764d-4b35-8e53-07573aa4c057,
> volume: sdc-part1}
> - {device: sdc-part1_format, id: sdc-part1_mount, path: /, type: mount}
> version: 1
> ...
> ...
> ----
>
> I was trying to test an install to one of the other disks which also
> failed.
>

It's hard to say; if you have the entire curtin config sent I may be able
to parse out what's going on:
From the maas cli:

maas <user> node get-curtin-config <system_id>

and attach to this bug.

>
> I had to remove the nvme device and 2 other devices from the web ui as
> configs/config-002.cfg had every disk listed, including the nvme device
> which I had specified in curtin_userdata. The config data is that from
> commissioning.
>
> I also noted that despite me selecting a different boot device that it
> was still trying to install grub to sda.
>

>
> Does this sound like another bug with curtin or should I raise it with
> the maas project?
>

Boot device selection *could* be a maas issue or curtin. I suggest
opening a new bug against MAAS for the boot device selection,
and I can add a MAAS task to this one. In both places, please append
the output from ...

Read more...

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

On Mon, Mar 7, 2016 at 2:15 PM, Rob Sanderson <email address hidden>
wrote:

> Hi Ryan,
>
> Here you go
>
> /var/lib/cloud/instance/scripts/part-001 extract
>
> cd curtin
>
> cat configs/config-000.cfg
> #cloud-config
> …
> ...
> partitioning_commands:
> builtin: [curtin, block-meta, custom]
> storage:
> config:
> - {id: nvme0n1, name: nvme0n1, path: /dev/nvme0n1, ptable: gpt, type:
> disk, wipe: superblock}
> - {device: nvme0n1, id: nvme0n1p1, name: nvme0n1p1, number: 'p1',
> offset: 4194304B, size: 128026935296B, type: partition, wipe: superblock}
> - {fstype: ext4, id: nvme0n1p1_format, label: 'rootfs', type: format,
> path: /dev/nvme0n1p1, volume: nvme0n1p1}
> version: 1
>
> bin/curtin --showtrace --install-deps install
> --config=configs/config-000.cfg
> http://10.10.4.221:5248/images/ubuntu/amd64/generic/trusty/release/root-tgz
> Creating new GPT entries.
> The operation has completed successfully.
> An error occured handling 'nvme0n1p1': IOError - [Errno 2] No such file or
> directory: '/sys/block/nvme0n1/nvme0n1None/size'
> Traceback (most recent call last):
> File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
> ret = args.func(args)
> File "curtin/commands/block_meta.py", line 62, in block_meta
> meta_custom(args)
> File "curtin/commands/block_meta.py", line 1083, in meta_custom
> handler(command, storage_config_dict)
> File "curtin/commands/block_meta.py", line 565, in partition_handler
> with open(os.path.join(previous_partition, "size"), "r") as fp:
> IOError: [Errno 2] No such file or directory:
> '/sys/block/nvme0n1/nvme0n1None/size'
> [Errno 2] No such file or directory: '/sys/block/nvme0n1/nvme0n1None/size'
> Installation failed with exception: Unexpected error while running command.
> Command: ['curtin', 'block-meta', 'custom']
> Exit code: 3
> Reason: -
> Stdout: 'Creating new GPT entries.\nThe operation has completed
> successfully.\nAn error occured handling \'nvme0n1p1\': IOError - [Errno 2]
> No such file or directory:
> \'/sys/block/nvme0n1/nvme0n1None/size\'\nTraceback (most recent call
> last):\n File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in
> main\n ret = args.func(args)\n File "curtin/commands/block_meta.py",
> line 62, in block_meta\n meta_custom(args)\n File
> "curtin/commands/block_meta.py", line 1083, in meta_custom\n
> handler(command, storage_config_dict)\n File
> "curtin/commands/block_meta.py", line 565, in partition_handler\n with
> open(os.path.join(previous_partition, "size"), "r") as fp:\nIOError: [Errno
> 2] No such file or directory:
> \'/sys/block/nvme0n1/nvme0n1None/size\'\n[Errno 2] No such file or
> directory: \'/sys/block/nvme0n1/nvme0n1None/size\'\n'
> Stderr: ''
> Traceback (most recent call last):
> File "/home/ubuntu/curtin/curtin/commands/main.py", line 209, in main
> ret = args.func(args)
> File "curtin/commands/install.py", line 399, in cmd_install
> raise e
>

OK, no need to let you continue to debug getting curtin partition handling
to learn about NVME.

Revision history for this message
Rob Sanderson (robsanderson) wrote :

Hi Ryan,

I'm more than happy to let maas supply the data, I'm only trying to override the default behaviour by adding to /etc/maas/preseeds/curtin_userdata to get around the nvme bug.

Here's the output:

root@maas1:~# maas admin node get-curtin-config node-4c4aecf2-e332-11e5-a740-00163e1ca9db
Success.
Machine-readable output follows:
apt_mirrors:
  ubuntu_archive: http://archive.ubuntu.com//ubuntu
  ubuntu_security: http://archive.ubuntu.com//ubuntu
apt_proxy: http://10.10.4.221:8000/
debconf_selections:
  maas: 'cloud-init cloud-init/datasources multiselect MAAS

    cloud-init cloud-init/maas-metadata-url string http://10.10.4.221/MAAS/metadata/

    cloud-init cloud-init/maas-metadata-credentials string oauth_token_key=<redacted>

install:
  log_file: /tmp/install.log
  post_files:
  - /tmp/install.log
kernel:
  mapping: {}
  package: linux-generic
late_commands:
  maas:
  - wget
  - --no-proxy
  - http://10.10.4.221/MAAS/metadata/latest/by-id/node-4c4aecf2-e332-11e5-a740-00163e1ca9db/
  - --post-data
  - op=netboot_off
  - -O
  - /dev/null
network:
  config:
  - id: eth0
    mac_address <redacted>
    mtu: 1500
    name: eth0
    subnets:
    - address: 10.10.4.11/22
      dns_nameservers: []
      gateway: 10.10.4.1
      type: static
    type: physical
  - id: eth1
    mac_address: <redacted>
    mtu: 1500
    name: eth1
    subnets:
    - type: manual
    type: physical
  - bond_interfaces:
    - eth0
    - eth1
    id: bond0
    mac_address: <redacted>
    mtu: 1500
    name: bond0
    params:
      bond-downdelay: 0
      bond-lacp_rate: fast
      bond-miimon: 100
      bond-mode: 802.3ad
      bond-updelay: 0
      bond-xmit_hash_policy: layer2
    subnets:
    - type: manual
    type: bond
  - address: 10.10.4.221
    search:
    - <redacted>
    type: nameserver
  version: 1
network_commands:
  builtin:
  - curtin
  - net-meta
  - custom
partitioning_commands:
  builtin:
  - curtin
  - block-meta
  - custom
power_state:
  mode: reboot
reporting:
  maas:
    consumer_key: <redacted>
    endpoint: http://10.10.4.221/MAAS/metadata/status/node-4c4aecf2-e332-11e5-a740-00163e1ca9db
    token_key: <redacted>
    token_secret: <redacted>
    type: webhook
storage:
  config:
  - id: sdc
    model: Samsung SSD 840
    name: sdc
    serial: <redacted>
    type: disk
    wipe: superblock
  - id: sda
    model: ST2000DM001-1CH1
    name: sda
    serial: <redacted>
    type: disk
    wipe: superblock
  - id: sdb
    model: ST2000DM001-1CH1
    name: sdb
    serial: <redacted>
    type: disk
    wipe: superblock
  - grub_device: true
    id: nvme0n1
    name: nvme0n1
    path: /dev/nvme0n1
    ptable: msdos
    type: disk
    wipe: superblock
  - device: nvme0n1
    id: nvme0n1-part1
    name: nvme0n1-part1
    number: 1
    offset: 4194304B
    size: 128026935296B
    type: partition
    uuid: edf17540-d929-41cc-85de-c4df78802b8d
    wipe: superblock
  - fstype: ext4
    id: nvme0n1-part1_format
    label: ''
    type: format
    uuid: ce3b35c2-48ee-4d6f-9b20-0ff9642b2961
    volume: nvme0n1-part1
  - device: nvme0n1-part1_format
    id: nvme0n1-part1_mount
    path: /
    type: mount
  version: 1

Revision history for this message
Rob Sanderson (robsanderson) wrote :

Hi Ryan,

This appears to have fixed the nvme partition problem but, I'm sure there are nicer ways to do it.

root@maas1:~# diff -u /usr/lib/python3/dist-packages/curtin/commands/block_meta.py /usr/lib/python3/dist-packages/curtin/commands/block_meta.py.orig
--- /usr/lib/python3/dist-packages/curtin/commands/block_meta.py 2016-03-07 23:37:34.137946135 +0000
+++ /usr/lib/python3/dist-packages/curtin/commands/block_meta.py.orig 2016-03-07 23:37:28.565864667 +0000
@@ -368,13 +368,7 @@
         partnumber = determine_partition_number(vol.get('id'), storage_config)
         disk_block_path = get_path_to_storage_volume(vol.get('device'),
                                                      storage_config)
-
- if disk_block_path == '/dev/nvme0n1':
- volume_path = disk_block_path + 'p' + str(partnumber)
- else
- volume_path = disk_block_path + str(partnumber)
-
+ volume_path = disk_block_path + str(partnumber)
         devsync_vol = os.path.join(disk_block_path)

     elif vol.get('type') == "disk":

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

On Mon, Mar 7, 2016 at 5:40 PM, Rob Sanderson <email address hidden>
wrote:

> Hi Ryan,
>
> This appears to have fixed the nvme partition problem but, I'm sure
> there are nicer ways to do it.
>
>
Hi Rob!

Thanks for confirming a workaround.

> root@maas1:~# diff -u
> /usr/lib/python3/dist-packages/curtin/commands/block_meta.py
> /usr/lib/python3/dist-packages/curtin/commands/block_meta.py.orig
> --- /usr/lib/python3/dist-packages/curtin/commands/block_meta.py
> 2016-03-07 23:37:34.137946135 +0000
> +++ /usr/lib/python3/dist-packages/curtin/commands/block_meta.py.orig
> 2016-03-07 23:37:28.565864667 +0000
> @@ -368,13 +368,7 @@
> partnumber = determine_partition_number(vol.get('id'),
> storage_config)
> disk_block_path = get_path_to_storage_volume(vol.get('device'),
> storage_config)
> -
> - if disk_block_path == '/dev/nvme0n1':
> - volume_path = disk_block_path + 'p' + str(partnumber)
> - else
> - volume_path = disk_block_path + str(partnumber)
> -
> + volume_path = disk_block_path + str(partnumber)
> devsync_vol = os.path.join(disk_block_path)
>
> elif vol.get('type') == "disk":
>
> --
> You received this bug notification because you are subscribed to curtin
> in Ubuntu.
> Matching subscriptions: curtin-bugs, curtin-bugs-all
> https://bugs.launchpad.net/bugs/1401190
>
> Title:
> curtin makes assumptions about partition names on all devices
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/curtin/+bug/1401190/+subscriptions
>

Revision history for this message
Scott Moser (smoser) wrote : Fixed in Curtin 17.1

This bug is believed to be fixed in curtin in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
status: Fix Committed → Fix Released
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.