[Bug 1985253] Re: In a new 20.04 LXD container, do-release-upgrade crashes as lspci cannot be found

M 1985253 at bugs.launchpad.net
Wed Apr 3 13:22:14 UTC 2024


unfortunatly the issue seems not to be fixed in my case. I'm running

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

in proxmox container.

apt update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.


do-release-upgrade

Checking for a new Ubuntu release
Get:1 Upgrade tool signature [833 B]
Get:2 Upgrade tool [1270 kB]
Fetched 1271 kB in 0s (0 B/s)
authenticate 'jammy.tar.gz' against 'jammy.tar.gz.gpg'
extracting 'jammy.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://archive.ubuntu.com/ubuntu focal InRelease
Hit http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit http://archive.ubuntu.com/ubuntu focal-security InRelease
Fetched 0 B in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Restoring original system state

Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done

tail -f -n99 /var/log/dist-upgrade/main.log
2024-04-03 15:10:19,698 INFO Using config files '['./DistUpgrade.cfg.focal', '/etc/update-manager/release-upgrades.d/ubuntu-advantage-upgrades.cfg']'
2024-04-03 15:10:19,698 INFO uname information: 'Linux lamp 6.5.13-3-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.13-3 (2024-03-20T10:45Z) x86_64'
2024-04-03 15:10:20,121 INFO apt version: '2.0.10'
2024-04-03 15:10:20,121 INFO python version: '3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0]'
2024-04-03 15:10:20,127 INFO release-upgrader version '22.04.19' started
2024-04-03 15:10:20,137 INFO locale: 'en_US' 'UTF-8'
2024-04-03 15:10:20,190 INFO screen could not be run
2024-04-03 15:10:20,211 WARNING estimate_kernel_initrd_size_in_boot() returned '0' for kernel?
2024-04-03 15:10:20,211 WARNING estimate_kernel_initrd_size_in_boot() returned '0' for initrd?
2024-04-03 15:10:20,226 DEBUG Using 'DistUpgradeViewText' view
2024-04-03 15:10:20,276 DEBUG enable dpkg --force-overwrite
2024-04-03 15:10:20,321 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
2024-04-03 15:10:21,980 DEBUG lsb-release: 'focal'
2024-04-03 15:10:21,980 DEBUG _pythonSymlinkCheck run
2024-04-03 15:10:21,981 DEBUG openCache()
2024-04-03 15:10:21,981 DEBUG quirks: running PreCacheOpen
2024-04-03 15:10:21,981 DEBUG running Quirks.PreCacheOpen
2024-04-03 15:10:22,840 DEBUG /openCache(), new cache size 89803
2024-04-03 15:10:22,841 DEBUG need_server_mode(): can not find a desktop meta package or key deps, running in server mode
2024-04-03 15:10:22,841 DEBUG checkViewDepends()
2024-04-03 15:10:22,841 DEBUG depends: 'apt (>= 2.0.4)'
2024-04-03 15:10:22,842 DEBUG checking: '[('apt', '2.0.4', '>=')]'
2024-04-03 15:10:22,842 DEBUG depends: 'libapt-pkg6.0 (>= 2.0.4)'
2024-04-03 15:10:22,842 DEBUG checking: '[('libapt-pkg6.0', '2.0.4', '>=')]'
2024-04-03 15:10:22,846 DEBUG running doUpdate() (showErrors=False)
2024-04-03 15:10:23,973 DEBUG openCache()
2024-04-03 15:10:24,805 DEBUG /openCache(), new cache size 89803
2024-04-03 15:10:24,806 DEBUG doPostInitialUpdate
2024-04-03 15:10:24,806 DEBUG quirks: running jammyPostInitialUpdate
2024-04-03 15:10:24,806 DEBUG running Quirks.jammyPostInitialUpdate
2024-04-03 15:10:25,305 DEBUG running Quirks._test_and_fix_missing_nvidia_metapackage
2024-04-03 15:10:25,305 ERROR ubuntu-drivers-common not installed
2024-04-03 15:12:25,334 ERROR Unhandled error connecting to the snap store.
2024-04-03 15:12:25,334 DEBUG abort called
2024-04-03 15:12:25,334 DEBUG openCache()
2024-04-03 15:12:26,212 DEBUG /openCache(), new cache size 89803


Don't know if I'm right, but this bug seems to closest to my problem.

-- 
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/1985253

Title:
  In a new 20.04 LXD container, do-release-upgrade crashes as lspci
  cannot be found

Status in ubuntu-release-upgrader package in Ubuntu:
  Invalid
Status in ubuntu-release-upgrader source package in Jammy:
  Fix Released

Bug description:
  Impact
  ------
  It is not possible to use do-release-upgrade on some installs (lxc containers, chroots) of Ubuntu as pci-utils may not be installed. It is called by nvidiadetector (bundled in the dist-upgrader tarball) which in turn is called by a newly added upgrade quirk.

  Test Case
  ---------
  1) lxc launch images:ubuntu/20.04
  2) get a shell on the container
  3) Install ubuntu-release-upgrader-core
  4) Run do-release-upgrade

  do-release-upgrade crashes with the trace below

  With the version of ubuntu-release-upgrader from -proposed (testable
  by using do-release-upgrade -p) the release upgrade will no longer
  crash in this way and the upgrade will proceed.

  Regression Potential
  --------------------
  There could be syntax errors or typos in the added check but running the test case will reveal those.

  Installing pciutils for the lspci binary fixes the issue

  ***** shell input and trace *****

  # do-release-upgrade
  Checking for a new Ubuntu release
  Get:1 Upgrade tool signature [819 B]
  Get:2 Upgrade tool [1267 kB]
  Fetched 1268 kB in 0s (0 B/s)
  authenticate 'jammy.tar.gz' against 'jammy.tar.gz.gpg'
  extracting 'jammy.tar.gz'

  Reading cache

  Checking package manager
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  Hit http://archive.ubuntu.com/ubuntu focal InRelease
  Hit http://archive.ubuntu.com/ubuntu focal-updates InRelease
  Hit http://security.ubuntu.com/ubuntu focal-security InRelease
  Fetched 0 B in 0s (0 B/s)
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done

  A fatal error occurred

  Please report this as a bug and include the files
  /var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in
  your report. The upgrade has aborted.
  Your original sources.list was saved in
  /etc/apt/sources.list.distUpgrade.

  Traceback (most recent call last):

  File "/tmp/ubuntu-release-upgrader-4e8f3dz6/jammy", line 8, in
  <module>
  sys.exit(main())

  File
  "/tmp/ubuntu-release-upgrader-4e8f3dz6/DistUpgrade/DistUpgradeMain.py",
  line 241, in main
  if app.run():

  File
  "/tmp/ubuntu-release-upgrader-4e8f3dz6/DistUpgrade/DistUpgradeController.py",
  line 2042, in run
  return self.fullUpgrade()

  File
  "/tmp/ubuntu-release-upgrader-4e8f3dz6/DistUpgrade/DistUpgradeController.py",
  line 1873, in fullUpgrade
  if not self.doPostInitialUpdate():

  File
  "/tmp/ubuntu-release-upgrader-4e8f3dz6/DistUpgrade/DistUpgradeController.py",
  line 906, in doPostInitialUpdate
  self.quirks.run("PostInitialUpdate")

  File
  "/tmp/ubuntu-release-upgrader-4e8f3dz6/DistUpgrade/DistUpgradeQuirks.py",
  line 99, in run
  func()

  File
  "/tmp/ubuntu-release-upgrader-4e8f3dz6/DistUpgrade/DistUpgradeQuirks.py",
  line 126, in jammyPostInitialUpdate
  self._fix_missing_nvidia_metapackage()

  File
  "/tmp/ubuntu-release-upgrader-4e8f3dz6/DistUpgrade/DistUpgradeQuirks.py",
  line 1492, in _fix_missing_nvidia_metapackage
  nv = NvidiaDetection()

  File
  "/tmp/ubuntu-release-upgrader-4e8f3dz6/NvidiaDetector/nvidiadetector.py",
  line 72, in __init__
  self.detection()

  File
  "/tmp/ubuntu-release-upgrader-4e8f3dz6/NvidiaDetector/nvidiadetector.py",
  line 113, in detection
  p1 = Popen(['lspci', '-n'], stdout=PIPE, universal_newlines=True)

  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
  self._execute_child(args, executable, preexec_fn, close_fds,

  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
  raise child_exception_type(errno_num, err_msg, err_filename)

  FileNotFoundError: [Errno 2] No such file or directory: 'lspci
  ---
  ProblemType: Bug
  ApportVersion: 2.20.11-0ubuntu27.24
  Architecture: amd64
  CasperMD5CheckResult: skip
  CrashDB: ubuntu
  DistroRelease: Ubuntu 20.04
  Package: ubuntu-release-upgrader-core 1:20.04.38
  PackageArchitecture: all
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=C.UTF-8
  ProcVersionSignature: Ubuntu 4.15.0-188.199-generic 4.15.18
  Tags:  focal dist-upgrade
  Uname: Linux 4.15.0-188-generic x86_64
  UpgradeStatus: Upgraded to focal on 2022-08-11 (0 days ago)
  UserGroups: N/A
  VarLogDistupgradeAptlog:
   Log time: 2022-08-11 17:10:43.752341
   Log time: 2022-08-11 17:10:46.113962
  _MarkForUpload: True

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




More information about the foundations-bugs mailing list