add support to do-release-upgrade for (EOL) kinetic/lunar to noble upgrades

Bug #2075969 reported by Kyler Hornor
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Unassigned
Noble
In Progress
High
Unassigned

Bug Description

[Impact]

Users stuck in kinetic, lunar, and mantic cannot upgrade to noble.

[Test Plan]

1. Perform an upgrade from kinetic

* First, create a jammy container and then manually upgrade it to kinetic:

$ lxc launch ubuntu:jammy j
$ lxc exec j bash
$ sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
$ sed -i 's/jammy/kinetic/g' /etc/apt/sources.list
$ apt update && apt dist-upgrade -y

[...]

* Now, try to upgrade:

$ do-release-upgrade

* This will fail with a message along the lines of "upgrades from kinetic to noble are not supported." Try with the version in -proposed, and it should work now:

$ do-release-upgrade --proposed

* This should run to completion.

2. Do a jammy -> noble upgrade to ensure no adverse side effects were introduced:

$ lxc launch ubuntu:jammy j
$ lxc exec j bash
$ do-release-upgrade --proposed

[Where problems could occur]

This patch changes the way From= is used in DistUpgrade.cfg. It now treats that field as a list and interprets it as allowable upgrade paths, instead of requiring a DistUpgrade.cfg.$series to exist for the current series.

This of course could disrupt existing upgrade paths, which is why the test plan requires a jammy->noble upgrade, too.

There were also other places in the code that used that From= field. These have been updated, but if any spots were missed, that could break existing logic.

[Original Description]

[Current Behavior]
Users still on Kinetic and Lunar are prompted to upgrade to Noble via the motd, however d-r-u claims that upgrading from those releases -> noble is unsupported. You also can not upgrade to mantic anymore, so you would need to manually change your sources to facilitate the upgrade.

[Expected Behavior]
Despite these releases being EOL, historically we have allowed d-r-u (hirsute->jammy for example).

[Replication Steps]
Launch a lunar instance, upgrade to latest packages, and call do-release upgrade

[Root Cause]
It appears that we're missing DistUpgrade.cfg.jammy for kinetic/lunar's UpgradeTools . Ideally we should fix this to allow easier upgrades to supported releases, as we had previously.

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

Actually, we are missing a parallel to DistUpgrade.cfg.jammy named DistUpgrade.cfg.kinetic and DistUpgrade.cfg.lunar. As there needs to be a DistUpgrade.cfg for the release from which you are upgrading which says what release you can upgrade to (see [Sources]) among other things.

This all seems prone to breakage though.

Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
tags: added: rls-nn-incoming
summary: - lunar/mantic releases unable to do-release-upgrade to jammy
+ kinetic/lunar releases unable to do-release-upgrade to jammy
Revision history for this message
Epiesasha (epiesasha) wrote : Re: kinetic/lunar releases unable to do-release-upgrade to jammy

same issue for me:

Can not upgrade

An upgrade from 'lunar' to 'noble' is not supported with this tool.

summary: - kinetic/lunar releases unable to do-release-upgrade to jammy
+ kinetic/lunar releases unable to do-release-upgrade to noble
tags: added: foundations-todo
removed: rls-nn-incoming
Changed in ubuntu-release-upgrader (Ubuntu Noble):
milestone: none → noble-updates
importance: Undecided → High
status: New → Triaged
summary: - kinetic/lunar releases unable to do-release-upgrade to noble
+ add support for kinetic/lunar releases do-release-upgrade to noble
summary: - add support for kinetic/lunar releases do-release-upgrade to noble
+ add support to do-release-upgrade for (EOL) kinetic/lunar to noble
+ upgrades
Revision history for this message
sudheera (catchsudheera) wrote :

For those who are stuck, following manual upgrade path worked for me.

sudo sed -i 's|http://ports.ubuntu.com/ubuntu-ports|http://old-releases.ubuntu.com/ubuntu|g' /etc/apt/sources.list
sudo apt update && sudo apt upgrade -y
sudo sed -i 's|lunar|mantic|g' /etc/apt/sources.list
sudo apt update && sudo apt upgrade -y

# Had to fix the installs for libc6
sudo apt --fix-broken install

sudo apt dist-upgrade

# use `cat /etc/os-release` to ensure you have upgraded to mantic at this point
# reboot the system

sudo do-release-upgrade

Nick Rosbrook (enr0n)
Changed in ubuntu-release-upgrader (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Nick Rosbrook (enr0n) wrote :

I will stage these changes in git, but we just did an SRU for the 24.04.2 release, and this is not urgent enough to do another one immediately.

description: updated
Changed in ubuntu-release-upgrader (Ubuntu Noble):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:25.04.6

---------------
ubuntu-release-upgrader (1:25.04.6) plucky; urgency=medium

  * all: replace remaining uses of lsb_release
  * DistUpgrade: define From= as list of supported upgrade paths (LP: #2075969)
  * DistUpgradeCache: remove remaining aufs logic
  * DistUpgradeApport: fix call to apport_excepthook (LP: #2096824)
  * Run pre-build.sh: updating mirrors and translations.

 -- Nick Rosbrook <email address hidden> Thu, 06 Feb 2025 15:38:50 -0500

Changed in ubuntu-release-upgrader (Ubuntu):
status: Fix Committed → Fix Released
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.