To reproduce this, I think you can
- Install Jammy
- Switch or use a mirror not listed on the official ubuntu mirror list, and not 
under ubuntu.com. In my case, I was using 
https://mirror.webinabox.net.au/ubuntu/
- Attach Ubuntu Pro
- Run do-release-upgrade

I suspect this may also reproduce if you also add:
ddebs.ubuntu.com enabled, as per 
https://wiki.ubuntu.com/DebuggingProgramCrash#Non-built-in_debug_symbol_packages_.28.2A-dbgsym.29
possibly the ubuntu cloud archive - as they are all under ubuntu.com


Without any other mirror under ubuntu.com, do-release-upgrade throws a prompt 
something like "we can't find an official mirorr, should I just update all 
mentions of "jammy" to "noble" in your sources.list and it works.

But with pro enabled, it decides to assume the esm.ubuntu.com is an
official mirror, same seems to happen with ddebs.ubuntu.com. It then
doesn't throw that prompt, disables the ubuntu.sources file and you ONLY
have esm.ubuntu.com or ddebs.ubuntu.com which doesn't have the full
package set, the upgrade then fails to find a version for the ubuntu-
release process and the entire process fails and exits.


I would propose a fix for this would be to try use some better heuristics for 
finding your 'main' mirror, the current heuristics are not good. Some possible 
options may be:
- Looking for apt Origin=Ubuntu (like you do with pinning) - this is different 
to most other apt sources (including PPAs), though perhaps we should survey the 
most commonly used PPAs and unofficial apt repos.. perhaps some also set 
Origin=Ubuntu. From a quick look I can see ddebs.ubuntu.com has Origin: Ubuntu, 
but download.docker.com uses Docker, esm.ubuntu.com uses 
UbuntuESM/UbuntuESMApps, packages.microsoft.com uses something like 'azure-cli' 
or "Microsoft" and Launchpad PPAs use LP-PPA-*.. ddebs.ubuntu.com is the only 
source I've seen so far also having Origin=Ubuntu
- Check which mirror(s) are currently publishing the ubuntu-release package 
before the apt sources are changed, which is the same check it then does after 
switching the mirrors to determine upgrade possibility.
- You could sometimes look for the official ubuntu mirror apt signing key(s).. 
however there is a small subset of users who do re-sign the archive with a 
different key, for example to add packages or hold back certain package 
versions.. you can only sign the list with the official key if you use the same 
exact list as an upstream mirror.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2084208

Title:
  do-release-upgrade fails when esm is enabled

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/2084208/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to