[Bug 2074048] [NEW] cmd-curthooks/install-grub fails when installing Ubuntu 23.10
Huynh Vu Hoang Phuc
2074048 at bugs.launchpad.net
Thu Jul 25 05:31:32 UTC 2024
Public bug reported:
I was trying to install Unbuntu 23.10 with a kickstart like such:
storage:
grub:
install_devices:
- esp-partition
layout:
name: direct
match:
ssd: yes
And the installer caught the following exception:
2024-07-25T02:41:59.945041+00:00 ubuntu-server subiquity_log.5623[7352]: File "/snap/subiquity/5276/lib/python3.10/site-packages/curtin/commands/main.py", line 202, in main
2024-07-25T02:41:59.945063+00:00 ubuntu-server subiquity_log.5623[7352]: ret = args.func(args)
2024-07-25T02:41:59.945086+00:00 ubuntu-server subiquity_log.5623[7352]: File "/snap/subiquity/5276/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 1936, in curthooks
2024-07-25T02:41:59.945108+00:00 ubuntu-server subiquity_log.5623[7352]: builtin_curthooks(cfg, target, state)
2024-07-25T02:41:59.945130+00:00 ubuntu-server subiquity_log.5623[7352]: File "/snap/subiquity/5276/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 1901, in builtin_curthooks
2024-07-25T02:41:59.945152+00:00 ubuntu-server subiquity_log.5623[7352]: setup_grub(cfg, target, osfamily=osfamily,
2024-07-25T02:41:59.945174+00:00 ubuntu-server subiquity_log.5623[7352]: File "/snap/subiquity/5276/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 776, in setup_grub
2024-07-25T02:41:59.945196+00:00 ubuntu-server subiquity_log.5623[7352]: grubcfg['install_devices'])
2024-07-25T02:41:59.945217+00:00 ubuntu-server subiquity_log.5623[7352]: TypeError: 'GrubConfig' object is not subscriptable
2024-07-25T02:41:59.945239+00:00 ubuntu-server subiquity_log.5623[7352]: 'GrubConfig' object is not subscriptable
Checking the code at
https://github.com/canonical/curtin/blob/f96c957c756d2856889ae977677de32647a1cbc9/curtin/commands/curthooks.py#L776,
apparently the variable used in the warn message is not up-to-date. It
should be 'grubcfg.install_devices', not 'grubcfg["install_devices"]'
** Affects: curtin
Importance: Undecided
Status: New
** Attachment added: "node curtin deploy logs"
https://bugs.launchpad.net/bugs/2074048/+attachment/5800135/+files/curtin_call_trace.txt
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to curtin.
https://bugs.launchpad.net/bugs/2074048
Title:
cmd-curthooks/install-grub fails when installing Ubuntu 23.10
Status in curtin:
New
Bug description:
I was trying to install Unbuntu 23.10 with a kickstart like such:
storage:
grub:
install_devices:
- esp-partition
layout:
name: direct
match:
ssd: yes
And the installer caught the following exception:
2024-07-25T02:41:59.945041+00:00 ubuntu-server subiquity_log.5623[7352]: File "/snap/subiquity/5276/lib/python3.10/site-packages/curtin/commands/main.py", line 202, in main
2024-07-25T02:41:59.945063+00:00 ubuntu-server subiquity_log.5623[7352]: ret = args.func(args)
2024-07-25T02:41:59.945086+00:00 ubuntu-server subiquity_log.5623[7352]: File "/snap/subiquity/5276/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 1936, in curthooks
2024-07-25T02:41:59.945108+00:00 ubuntu-server subiquity_log.5623[7352]: builtin_curthooks(cfg, target, state)
2024-07-25T02:41:59.945130+00:00 ubuntu-server subiquity_log.5623[7352]: File "/snap/subiquity/5276/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 1901, in builtin_curthooks
2024-07-25T02:41:59.945152+00:00 ubuntu-server subiquity_log.5623[7352]: setup_grub(cfg, target, osfamily=osfamily,
2024-07-25T02:41:59.945174+00:00 ubuntu-server subiquity_log.5623[7352]: File "/snap/subiquity/5276/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 776, in setup_grub
2024-07-25T02:41:59.945196+00:00 ubuntu-server subiquity_log.5623[7352]: grubcfg['install_devices'])
2024-07-25T02:41:59.945217+00:00 ubuntu-server subiquity_log.5623[7352]: TypeError: 'GrubConfig' object is not subscriptable
2024-07-25T02:41:59.945239+00:00 ubuntu-server subiquity_log.5623[7352]: 'GrubConfig' object is not subscriptable
Checking the code at
https://github.com/canonical/curtin/blob/f96c957c756d2856889ae977677de32647a1cbc9/curtin/commands/curthooks.py#L776,
apparently the variable used in the warn message is not up-to-date. It
should be 'grubcfg.install_devices', not 'grubcfg["install_devices"]'
To manage notifications about this bug go to:
https://bugs.launchpad.net/curtin/+bug/2074048/+subscriptions
More information about the foundations-bugs
mailing list