[regression] GrubConfig' object is not subscriptable when grub.install-devices is used

Bug #2065697 reported by Dariusz Gadomski
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
curtin
In Progress
Undecided
Unassigned

Bug Description

Commit 4587fd40dfd7eabd6677004e91340edcfe5a7472 has made some refactoring around how GrubConfig properties may be accessed. There was a log message where old syntax has been left: curtin/commands/curthooks.py:782

This leads to causing a Python TypeError:
TypeError: 'GrubConfig' object is not subscriptable
'GrubConfig' object is not subscriptable

The fix seems to be just converting this message not to use the [] syntax.

This seems pretty important as most likely it affects all installations making use of grub.install-devices parameter.

Tags: curtin grub

Related branches

Revision history for this message
Dariusz Gadomski (dgadomski) wrote :
Revision history for this message
Dagmawi Biru (dagbiru) wrote :

If anyone encounters this issue, I've found success in an temporary workaround, invoking grub manually instead of via curtin like so:

late-commands:
- 'curtin in-target -- /usr/sbin/grub-install /dev/vda'

tags: added: grub
tags: added: curtin
Dan Bungert (dbungert)
Changed in curtin:
status: New → In Progress
Revision history for this message
Dariusz Gadomski (dgadomski) wrote :

The user who run into this was using a subiquity autoinstall setup with the following content in their config:

storage:
  grub:
    reorder_uefi: false
    install_devices:
    - /dev/sda

I believe any usage of the install_devices option in an automated subiquity installation will trigger this issue.

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.