failed kernel mapping specification

Bug #2026225 reported by Dan Bungert
42
This bug affects 4 people
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Undecided
Olivier Gayot
subiquity
Fix Released
Undecided
Unassigned
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Dan Bungert

Bug Description

In testing the current desktop installer ISOs with a freshly build u-d-i snap, curthooks fails like follows:

 finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/installing-kernel: FAIL: installing kernel
 finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
 Traceback (most recent call last):
   File "/snap/ubuntu-desktop-installer/x1/lib/python3.10/site-packages/curtin/commands/main.py", line 202, in main
     ret = args.func(args)
   File "/snap/ubuntu-desktop-installer/x1/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 1918, in curthooks
     builtin_curthooks(cfg, target, state)
   File "/snap/ubuntu-desktop-installer/x1/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 1752, in builtin_curthooks
     install_kernel(cfg, target)
   File "/snap/ubuntu-desktop-installer/x1/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 375, in install_kernel
     config.merge_config(mapping, kernel_cfg.get('mapping', {}))
 AttributeError: 'NoneType' object has no attribute 'get'
 'NoneType' object has no attribute 'get'
 curtin: Installation failed with exception: Unexpected error while running command.
 Command: ['curtin', 'curthooks']
 Exit code: 3
 Reason: -

happened as part of an autoinstall test, no override of the kernel value.

Tags: iso-testing

Related branches

Revision history for this message
Dan Bungert (dbungert) wrote :
description: updated
Revision history for this message
Olivier Gayot (ogayot) wrote :

I'm not sure yet why you ended up in this scenario. It looks like a subiquity bug.

That said, the install_kernel function in curthooks has code to handle kernel_cfg=None, but then it invokes the .get() method regardless. This is obviously wrong.

    if kernel_cfg is not None:
        kernel_package = kernel_cfg.get('package')
        kernel_fallback = kernel_cfg.get('fallback-package')
    else:
        kernel_package = None
        kernel_fallback = None

    config.merge_config(mapping, kernel_cfg.get('mapping', {}))

Changed in curtin:
status: New → In Progress
assignee: nobody → Olivier Gayot (ogayot)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit 168c4fd3 to curtin on branch master.
To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=168c4fd3

Changed in curtin:
status: In Progress → Fix Committed
Dan Bungert (dbungert)
tags: added: foundations-todo
Changed in livecd-rootfs (Ubuntu):
assignee: nobody → Dan Bungert (dbungert)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in livecd-rootfs (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
https://iso.qa.ubuntu.com/qatracker/reports/bugs/2026225

tags: added: iso-testing
Dan Bungert (dbungert)
Changed in subiquity:
status: New → Fix Released
Changed in curtin:
status: Fix Committed → Fix Released
Changed in livecd-rootfs (Ubuntu):
status: Confirmed → In Progress
Dan Bungert (dbungert)
Changed in livecd-rootfs (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 23.10.9

---------------
livecd-rootfs (23.10.9) mantic; urgency=medium

  * desktop, budgie: no need to include the kernel directly, it is installed
    at runtime (LP: #2026225)

 -- Dan Bungert <email address hidden> Wed, 02 Aug 2023 13:16:00 -0600

Changed in livecd-rootfs (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Dan Bungert (dbungert) wrote :

Reopened, due to reverting this change.

Changed in livecd-rootfs (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 23.10.34

---------------
livecd-rootfs (23.10.34) mantic; urgency=medium

  [ Steve Langasek ]
  * Drop (outdated, inconsistent) /etc/hosts from ubuntu-server chroot
    includes.

  [ Michael Hudson-Doyle ]
  * auto/config: use the new server-live task to reduce the use of explicit
    calls to add_package and add_snap a bit.

  [ Dave Jones ]
  * clean up references to obsolete pi subarchs no longer built, and remove
    code that writes out /boot/firmware settings that are later clobbered

  [ Dan Bungert ]
  * desktop: adjust kernel to be in the live layer, to support changing which
    kernel is installed rather than always using hwe. (LP: #2026225)

 -- Dan Bungert <email address hidden> Fri, 08 Sep 2023 08:54:13 -0600

Changed in livecd-rootfs (Ubuntu):
status: In Progress → Fix Released
Benjamin Drung (bdrung)
tags: removed: foundations-todo
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.