curtin does not properly support MD raid device renaming (uses /dev/<name> instead of /dev/md/<name> when creating a device)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
New
|
Undecided
|
Unassigned |
Bug Description
maas root machine get-curtin-config <system_id>
https:/
Trying to set up a raid device with a custom name (os-raid):
-
devices:
- os0-os-data
- os1-os-data
id: os-raid
name: os-raid
raidlevel: '1'
type: raid
-
fstype: ext4
id: os-raid-format
label: 'os'
type: format
volume: os-raid
-
device: os-raid-format
id: os-raid-mount
path: /
type: mount
Curtin fails to do that while invoking mdadm as it uses /dev/os-raid instead of /dev/md/os-raid:
https:/
md_devname = block.dev_
# ...
mdadm.
https:/
def dev_path(devname):
"""
convert device name to path in /dev
"""
if devname.
return devname
else:
return '/dev/' + devname
curtin: Installation started. (18.1)
third party drivers not installed or necessary.
An error occured handling 'os-raid': ProcessExecutio
Command: ['mdadm', '--create', '/dev/os-raid', '--run', '--homehost=
Exit code: 1
Reason: -
Stdout: ''
Stderr: mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
mdadm: /dev/os-raid is an invalid name for an md device. Try /dev/md/os-raid
Unexpected error while running command.
Command: ['mdadm', '--create', '/dev/os-raid', '--run', '--homehost=
Exit code: 1
Reason: -
Stdout: ''
Stderr: mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
mdadm: /dev/os-raid is an invalid name for an md device. Try /dev/md/os-raid
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: An error occured handling 'os-raid': ProcessExecutio
Command: ['mdadm', '--create', '/dev/os-raid', '--run', '--homehost=
Exit code: 1
Reason: -
Stdout: ''
Stderr: mdadm: Note: this array has metadata at the start and
Unexpected error while running command.
Command: ['mdadm', '--create', '/dev/os-raid', '--run', '--homehost=
Exit code: 1
Reason: -
Stdout: ''
Stderr: mdadm: Note: this array has metadata at the start and
Stderr: ''