autoinstall hwe kernel option fails for interim releases

Bug #2017236 reported by James Paton-Smith
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
subiquity
Triaged
Medium
Unassigned

Bug Description

When building an autoinstall config for interim Ubuntu releases (i.e. 23.04 lunar lobster), the hwe kernel flavor option causes the installer to fail when installing the kernel.

This seems to be because the installer tries to pulls the OS version number and append it to the package name for installation.

How to reproduce:
Create an autoinstall yaml which contains the following parameters

  kernel:
    flavor: hwe

Try to install an interim release with the given autoinstall

Expected result
The installer should select the appropriate kernel metapackage

What actually happens
The installer appends the OS version number to 'linux-generic-hwe-' and uses that as the package name.
For Ubuntu 23.04 Lunar Lobster, this would result in the package name 'linux-generic-hwe-23.04' being selected but the hwe package name is actually 'linux-generic-hwe-22.04' so causes the installer to fail.

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

Thanks for the bug report James.

You are right, we currently append the version number that we read from /etc/lsb-release. This is obviously the wrong way to determine the latest installable version.

We could lean on `distro-info --lts --release` but this will also produce wrong results in versions before jammy.

We might have to resort on `apt-cache search` or a similar command, unless there is a way to query the latest available hwe kernel version.

Changed in subiquity:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Olivier Gayot (ogayot) wrote (last edit ):

I have a local branch where I'm using python3-distro-info to determine for a given release, what is the last known LTS. This is basically working but only works for the hwe flavor. Other flavors have other versions available in the archive e.g., linux-image-oem-20.04 on lunar.

Changed in subiquity:
importance: High → Medium
Revision history for this message
James Paton-Smith (jamesps) wrote :

Yes it seems like a difficult problem to solve for all scenarios. I'm not sure what the right solution would be.

One idea could be to create another set of metapackages for each release which points to the appropriate package, but that would involve manual work for each Ubuntu release and just adds another layer of obscurity.

e.g.
linux-generic-hwe-23.04 > linux-generic-hwe-22.04

Revision history for this message
Bin (bin456789) wrote :

Another situation, When set this in ubuntu 22.04, the autoinstall will fail

  flavor:
    package: kvm

because do not have a package call "linux-kvm-22.04" but "linux-kvm"

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.