On Mon, Mar 7, 2016 at 1:50 PM, Rob Sanderson <1401...@bugs.launchpad.net>
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 the maas get-curtin-config output attached.  This helps
us debug whether MAAS sent curtin valid configuration and determine
if we need to fix the bug in MAAS or curtin itself.

In _this_ bugs case; if the config you send which defines 'number' field in
the partition dictionary, then curtin will *faithfully* attempt to use
<device path><partnumber> directly; ie; curtin is doing what it was told.

In the case where 'number' is not defined, curtin will attempt to determine
the
correct partition number.  For NVME devices, the logic is not sufficient
since
it doesn't really know that the underlying device is an NVME and NVME
devices
use different scheme for naming partition device entries (p<partnum> vs.
just <partnum>)

In this bug, we will teach curtin to detect NVME devices and pick the
correct partition dev path
if the config does _NOT_ include a specified 'number' value.

I'll open a MAAS task in this bug to help track if MAAS itself needs to
know a device is an NVME
and then specify the 'number' differently ('p1' vs '1').


--
> 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
>

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to curtin in Ubuntu.
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

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to