grub_device ignored when args.devices != 0 and args.devices > 1

Bug #1896758 reported by Gabriel Samfira
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
curtin
Triaged
High
Unassigned

Bug Description

When deploying a server with more than 1 disk, using whole disk images, the selected boot device from storage configuration is ignored, and curtin writes the disk image to the first block device in the list.

The devpath is correctly identified here:

https://git.launchpad.net/curtin/tree/curtin/commands/block_meta.py#n1950

and it is completely ignored, because len(devices) is > 1, and it selects the first disk from the list of a sorted args.devices here:

https://git.launchpad.net/curtin/tree/curtin/commands/block_meta.py#n1997

summary: - grub_device ignored when args.devices != 0
+ grub_device ignored when args.devices != 0 and args.devices > 1
Revision history for this message
Ryan Harper (raharper) wrote :

Thanks for filing a bug. Can you provide your curtin storage config and command line (if you're invoking it manually)?

Changed in curtin:
status: New → Incomplete
Revision history for this message
Gabriel Samfira (gabriel-samfira) wrote :

Hi Ryan,

Curtin is invoked by the MAAS userdata:

https://paste.ubuntu.com/p/Nt8J367b7Y/

I have attached the storage config for the node.

------

Some more debugging leads:

The following snippet from the installation log:

https://paste.ubuntu.com/p/xC9hFRJjhj/

is generated by:

https://git.launchpad.net/curtin/tree/curtin/commands/block_meta.py#n95

The following snippet from the installation log:

https://paste.ubuntu.com/p/5RRxYwCWWD/

is generated by:

https://git.launchpad.net/curtin/tree/curtin/commands/block_meta.py#n1993

I fixed it in my local MAAS install by applying the following patch:

https://paste.ubuntu.com/p/KBTdCFZDnK/

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

Thanks for the information.

Since you've provided a potential fix, would you be interested in contributing it directly?

https://curtin.readthedocs.io/en/latest/topics/hacking.html

Changed in curtin:
status: Incomplete → Confirmed
Revision history for this message
Gabriel Samfira (gabriel-samfira) wrote :

Hi Ryan,

Apologies for the late reply.

What I did is a hack at best. I currently have no bandwidth to implement a proper fix and write tests for it.

Dan Watkins (oddbloke)
Changed in curtin:
status: Confirmed → Triaged
importance: Undecided → High
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.