[Bug 2083575] Re: failed upgrade left apt sources on wrong release

Julian Andres Klode 2083575 at bugs.launchpad.net
Thu Oct 17 15:36:50 UTC 2024


Our options here are:

* Do not continue if ubuntu-minimal is not installed.
* Install ubuntu-minimal first before trying to upgrade
* Catch the KeyError
* Add a global catch-all that always tries to rollback.

** Tags removed: rls-nn-incoming
** Tags added: foundations-todo

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/2083575

Title:
  failed upgrade left apt sources on wrong release

Status in ubuntu-release-upgrader package in Ubuntu:
  Triaged

Bug description:
  Hello, I tried to upgrade a jammy machine to noble with do-release-
  upgrade and got a failure very early in the process. After the
  failure, my apt sources were left pointing to the new release, they
  weren't rolled back to the currently running release.

  These are the sources that the upgrader left for me:

  $ cat /etc/apt/sources.list
  # deb http://mirrors.kernel.org/ubuntu/ xenial main restricted
  # deb http://mirrors.kernel.org/ubuntu/ xenial-updates main restricted
  # deb http://mirrors.kernel.org/ubuntu/ xenial universe
  # deb http://mirrors.kernel.org/ubuntu/ xenial-updates universe
  # deb http://mirrors.kernel.org/ubuntu/ xenial multiverse
  # deb http://mirrors.kernel.org/ubuntu/ xenial-updates multiverse
  # deb-src http://mirrors.kernel.org/ubuntu/ xenial main restricted
  # deb-src http://mirrors.kernel.org/ubuntu/ xenial-updates main restricted
  # deb-src http://mirrors.kernel.org/ubuntu/ xenial universe
  # deb-src http://mirrors.kernel.org/ubuntu/ xenial-updates universe
  # deb-src http://mirrors.kernel.org/ubuntu/ xenial multiverse
  # deb-src http://mirrors.kernel.org/ubuntu/ xenial-updates multiverse
  # deb file:///srv/mirror/ubuntu/ bionic main restricted
  # deb file:///srv/mirror/ubuntu/ bionic-updates main restricted
  # deb file:///srv/mirror/ubuntu/ bionic universe
  # deb file:///srv/mirror/ubuntu/ bionic-updates universe
  # deb file:///srv/mirror/ubuntu/ bionic multiverse
  # deb file:///srv/mirror/ubuntu/ bionic-updates multiverse
  # deb-src file:///srv/mirror/ubuntu/ bionic main restricted
  # deb-src file:///srv/mirror/ubuntu/ bionic-updates main restricted
  # deb-src file:///srv/mirror/ubuntu/ bionic universe
  # deb-src file:///srv/mirror/ubuntu/ bionic-updates universe
  # deb-src file:///srv/mirror/ubuntu/ bionic multiverse
  # deb-src file:///srv/mirror/ubuntu/ bionic-updates multiverse

  ## # deb cdrom:[Ubuntu-Server 16.04 LTS _Xenial Xerus_ - Beta amd64 (20160325)]/ xenial main restricted
  ## 
  ## #deb cdrom:[Ubuntu-Server 16.04 LTS _Xenial Xerus_ - Beta amd64 (20160325)]/ xenial main restricted
  ## 
  ## # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
  ## # newer versions of the distribution.
  ## deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
  ## # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
  ## 
  ## ## Major bug fix updates produced after the final release of the
  ## ## distribution.
  ## deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
  ## # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
  ## 
  ## ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  ## ## team, and may not be under a free licence. Please satisfy yourself as to
  ## ## your rights to use the software. Also, please note that software in
  ## ## universe WILL NOT receive any review or updates from the Ubuntu security
  ## ## team.
  ## deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
  ## # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
  ## deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
  ## # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
  ## 
  ## ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
  ## ## team, and may not be under a free licence. Please satisfy yourself as to 
  ## ## your rights to use the software. Also, please note that software in 
  ## ## multiverse WILL NOT receive any review or updates from the Ubuntu
  ## ## security team.
  ## deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
  ## # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
  ## deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
  ## # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
  ## 
  ## ## N.B. software from this repository may not have been tested as
  ## ## extensively as that contained in the main release, although it includes
  ## ## newer versions of some applications which may provide useful features.
  ## ## Also, please note that software in backports WILL NOT receive any review
  ## ## or updates from the Ubuntu security team.
  ## deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
  ## # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
  ## 
  ## ## Uncomment the following two lines to add software from Canonical's
  ## ## 'partner' repository.
  ## ## This software is not part of Ubuntu, but is offered by Canonical and the
  ## ## respective vendors as a service to Ubuntu users.

  deb http://security.ubuntu.com/ubuntu noble-security main restricted multiverse universe
  # deb file:///srv/mirror/ubuntu/ noble main restricted multiverse universe # disabled on upgrade to noble
  # deb file:///srv/mirror/ubuntu/ jammy-updates main restricted multiverse universe # disabled on upgrade to noble
  # deb file:///srv/mirror/ubuntu/ jammy-security main restricted multiverse universe # disabled on upgrade to noble

  deb-src http://security.ubuntu.com/ubuntu noble-security main restricted multiverse universe
  # deb-src file:///srv/mirror/ubuntu/ noble main restricted multiverse universe # disabled on upgrade to noble
  # deb-src file:///srv/mirror/ubuntu/ jammy-updates main restricted multiverse universe # disabled on upgrade to noble
  # deb-src file:///srv/mirror/ubuntu/ jammy-security main restricted multiverse universe # disabled on upgrade to noble

  
  Unfortunately, the contents of the terminal weren't very well preserved. A partial amount of what was visible is:

  Reading cache

  Checking package manager

  Continue running under SSH?

  This session appears to be running under ssh. It is not recommended
  to perform a upgrade over ssh currently because in case of failure it
  is harder to recover.

  If you continue, an additional ssh daemon will be started at port
  '1022'.
  Do you want to continue?

  Continue [yN] y

  Starting additional sshd

  To make recovery in case of failure easier, an additional sshd will
  be started on port '1022'. If anything goes wrong with the running
  ssh you can still connect to the additional one.
  If you run a firewall, you may need to temporarily open this port. As
  this is potentially dangerous it's not done automatically. You can
  open the port with e.g.:
  'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'

  To continue please press [ENTER]

  Reading package lists... Done
  Building dependency tree... Done
  Reading state information... Done
  Get:1 file:/srv/mirror/ubuntu jammy InRelease [270 kB]
  Get:2 file:/srv/mirror/ubuntu jammy InRelease [270 kB]
  Get:3 file:/srv/mirror/ubuntu jammy-updates InRelease [128 kB]
  Get:4 file:/srv/mirror/ubuntu jammy-security InRelease [129 kB]
  Get:5 file:/srv/mirror/ubuntu jammy-updates InRelease [128 kB]
  Get:6 file:/srv/mirror/ubuntu jammy-security InRelease [129 kB]
  Hit http://security.ubuntu.com/ubuntu jammy-security InRelease
  Get:7 http://ddebs.ubuntu.com jammy InRelease [41.3 kB]
  Hit https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease
  Hit https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease
  Hit http://ddebs.ubuntu.com jammy-updates InRelease
  Hit https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease
  Hit http://ddebs.ubuntu.com jammy-proposed InRelease
  Hit https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease
  Fetched 41.3 kB in 0s (0 B/s)
  Reading package lists... Done
  Building dependency tree... Done
  Reading state information... Done

  Checking for installed snaps

  Calculating snap size requirements

  Updating repository information

  Third party sources disabled

  Some third party entries in your sources.list were disabled. You can
  re-enable them after the upgrade with the 'software-properties' tool
  or your package manager.

  To continue please press [ENTER]

  Get:1 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
  Get:2 http://ddebs.ubuntu.com noble InRelease [41.3 kB]
  Get:3 https://esm.ubuntu.com/apps/ubuntu noble-apps-security InRelease [7,532 B]
  Get:4 https://esm.ubuntu.com/apps/ubuntu noble-apps-updates InRelease [7,468 B]
  Get:5 http://ddebs.ubuntu.com noble-updates InRelease [41.3 kB]
  Get:6 https://esm.ubuntu.com/infra/ubuntu noble-infra-security InRelease [7,462 B]
  Get:7 https://esm.ubuntu.com/infra/ubuntu noble-infra-updates InRelease [7,461 B]
  Get:8 http://ddebs.ubuntu.com noble-proposed InRelease [41.4 kB]
  Get:9 https://esm.ubuntu.com/apps/ubuntu noble-apps-security/main i386 Packages [10.4 kB]
  Get:10 http://security.ubuntu.com/ubuntu noble-security/universe Sources [252 kB]
  Get:11 https://esm.ubuntu.com/apps/ubuntu noble-apps-security/main amd64 Packages [17.0 kB]
  Get:12 https://esm.ubuntu.com/apps/ubuntu noble-apps-updates/main amd64 Packages [623 B]
  Get:13 http://ddebs.ubuntu.com noble/main i386 Packages [316 kB]
  Get:14 https://esm.ubuntu.com/infra/ubuntu noble-infra-security/main amd64 Packages [658 B]
  Get:15 https://esm.ubuntu.com/infra/ubuntu noble-infra-updates/main amd64 Packages [658 B]
  Get:16 http://security.ubuntu.com/ubuntu noble-security/main Sources [102 kB]
  Get:17 http://security.ubuntu.com/ubuntu noble-security/multiverse Sources [6,304 B]
  Get:18 http://security.ubuntu.com/ubuntu noble-security/restricted Sources [19.4 kB]
  Get:19 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [380 kB]
  Get:20 http://security.ubuntu.com/ubuntu noble-security/main i386 Packages [160 kB]
  Get:21 http://security.ubuntu.com/ubuntu noble-security/main Translation-en [83.1 kB]
  Get:22 http://ddebs.ubuntu.com noble/main amd64 Packages [569 kB]
  Get:23 http://security.ubuntu.com/ubuntu noble-security amd64 Contents (deb) [10.9 MB]
  Get:24 http://ddebs.ubuntu.com noble/restricted amd64 Packages [884 B]
  Get:25 http://ddebs.ubuntu.com noble/restricted i386 Packages [716 B]
  Get:26 http://ddebs.ubuntu.com noble/universe i386 Packages [453 kB]
  Get:27 http://ddebs.ubuntu.com noble/universe amd64 Packages [5,115 kB]
  Get:28 http://security.ubuntu.com/ubuntu noble-security i386 Contents (deb) [5,541 kB]
  Get:29 http://ddebs.ubuntu.com noble/multiverse amd64 Packages [86.0 kB]
  Get:30 http://ddebs.ubuntu.com noble/multiverse i386 Packages [2,616 B]
  Get:31 http://ddebs.ubuntu.com noble-updates/main i386 Packages [78.5 kB]
  Get:32 http://ddebs.ubuntu.com noble-updates/main amd64 Packages [170 kB]
  Get:33 http://ddebs.ubuntu.com noble-updates/restricted amd64 Packages [888 B]
  Get:34 http://ddebs.ubuntu.com noble-updates/universe amd64 Packages [224 kB]
  Get:35 http://ddebs.ubuntu.com noble-updates/universe i386 Packages [53.2 kB]
  Get:36 http://ddebs.ubuntu.com noble-updates/multiverse amd64 Packages [2,696 B]
  Get:37 http://ddebs.ubuntu.com noble-proposed/main i386 Packages [15.2 kB]
  Get:38 http://security.ubuntu.com/ubuntu noble-security/main amd64 c-n-f Metadata [4,576 B]
  Get:39 http://security.ubuntu.com/ubuntu noble-security/restricted i386 Packages [13.7 kB]
  Get:40 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [353 kB]
  Get:41 http://security.ubuntu.com/ubuntu noble-security/restricted Translation-en [68.1 kB]
  Get:42 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 c-n-f Metadata [428 B]
  Get:43 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [10.9 kB]
  Get:44 http://security.ubuntu.com/ubuntu noble-security/multiverse i386 Packages [2,392 B]
  Get:45 http://security.ubuntu.com/ubuntu noble-security/multiverse Translation-en [2,808 B]
  Get:46 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 c-n-f Metadata [344 B]
  Get:47 http://security.ubuntu.com/ubuntu noble-security/universe i386 Packages [107 kB]
  Get:48 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [275 kB]
  Get:49 http://security.ubuntu.com/ubuntu noble-security/universe Translation-en [116 kB]
  Get:50 http://ddebs.ubuntu.com noble-proposed/main amd64 Packages [37.9 kB]
  Get:51 http://security.ubuntu.com/ubuntu noble-security/universe amd64 c-n-f Metadata [10.4 kB]
  Get:52 http://ddebs.ubuntu.com noble-proposed/universe i386 Packages [10.5 kB]
  Ign http://ddebs.ubuntu.com noble-proposed/universe amd64 Packages
  Ign http://ddebs.ubuntu.com noble-proposed/multiverse amd64 Packages
  Ign http://ddebs.ubuntu.com noble-proposed/universe amd64 Packages
  Ign http://ddebs.ubuntu.com noble-proposed/multiverse amd64 Packages
  Ign http://ddebs.ubuntu.com noble-proposed/universe amd64 Packages
  Ign http://ddebs.ubuntu.com noble-proposed/multiverse amd64 Packages
  Err http://ddebs.ubuntu.com noble-proposed/universe amd64 Packages
    429  Too Many Requests [IP: 185.125.190.17 80]
  Err http://ddebs.ubuntu.com noble-proposed/multiverse amd64 Packages
    429  Too Many Requests [IP: 185.125.190.17 80]
  Err http://ddebs.ubuntu.com noble-proposed/universe amd64 Packages
    429  Too Many Requests [IP: 185.125.190.17 80]
  Err http://ddebs.ubuntu.com noble-proposed/multiverse amd64 Packages
    429  Too Many Requests [IP: 185.125.190.17 80]
  Err http://ddebs.ubuntu.com noble-proposed/universe amd64 Packages
    429  Too Many Requests [IP: 185.125.190.17 80]
  Err http://ddebs.ubuntu.com noble-proposed/multiverse amd64 Packages
    429  Too Many Requests [IP: 185.125.190.17 80]
  Fetched 25.8 MB in 6s (0 B/s)
  Hit http://security.ubuntu.com/ubuntu noble-security InRelease
  Get:1 http://ddebs.ubuntu.com noble InRelease [41.3 kB]
  Hit https://esm.ubuntu.com/apps/ubuntu noble-apps-security InRelease
  Get:2 http://ddebs.ubuntu.com noble-updates InRelease [41.3 kB]
  Hit https://esm.ubuntu.com/apps/ubuntu noble-apps-updates InRelease
  Hit https://esm.ubuntu.com/infra/ubuntu noble-infra-security InRelease
  Hit https://esm.ubuntu.com/infra/ubuntu noble-infra-updates InRelease
  Get:3 http://ddebs.ubuntu.com noble-proposed InRelease [41.4 kB]
  Get:4 http://ddebs.ubuntu.com noble-proposed/main amd64 Packages [37.9 kB]
  Get:5 http://ddebs.ubuntu.com noble-proposed/main i386 Packages [15.2 kB]
  Get:6 http://ddebs.ubuntu.com noble-proposed/universe i386 Packages [10.5 kB]
  Get:7 http://ddebs.ubuntu.com noble-proposed/universe amd64 Packages [50.4 kB]
  Get:8 http://ddebs.ubuntu.com noble-proposed/multiverse amd64 Packages [2,696 B]
  Fetched 136 kB in 0s (0 B/s)

  Checking package manager
  Reading package lists... Done
  Building dependency tree... Done
  Reading state information... Done

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apt/cache.py", line 281, in __getitem__
      rawpkg = self._cache[key]
  KeyError: 'ubuntu-minimal'

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: ubuntu-release-upgrader-core 1:22.04.20 [origin: unknown]
  ProcVersionSignature: Ubuntu 5.15.0-113.123-generic 5.15.152
  Uname: Linux 5.15.0-113-generic x86_64
  NonfreeKernelModules: lkp_Ubuntu_5_15_0_113_123_generic_106 zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu82.6
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CrashDB: ubuntu
  CrashReports:
   640:0:0:30866:2024-10-01 16:01:50.626541614 -0700:2024-10-01 16:01:51.626541614 -0700:/var/crash/_usr_sbin_tcptop-bpfcc.0.crash
   640:0:0:1095175:2024-10-02 17:30:47.399752140 -0700:2024-10-02 17:30:48.399752140 -0700:/var/crash/_usr_bin_do-release-upgrade.0.crash
  Date: Wed Oct  2 17:37:31 2024
  InstallationDate: Installed on 2016-04-04 (3103 days ago)
  InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Beta amd64 (20160325)
  PackageArchitecture: all
  ProcEnviron:
   LC_TIME=C
   TERM=rxvt-unicode-256color
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  RebootRequiredPkgs: Error: path contained symlinks.
  SourcePackage: ubuntu-release-upgrader
  UpgradeStatus: Upgraded to jammy on 2024-10-03 (0 days ago)
  VarLogDistupgradeAptlog:
   Log time: 2024-10-02 17:29:48.619815
   Log time: 2024-10-02 17:29:52.064943
   Log time: 2024-10-02 17:30:48.248136

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2083575/+subscriptions




More information about the foundations-bugs mailing list