[Bug 2059898] Re: Subiquity fails to download packages after ignoring mirror test result

Olivier Gayot 2059898 at bugs.launchpad.net
Tue Apr 16 07:40:49 UTC 2024


** Description changed:

  Context
  -------
  * We have a screen in Subiquity where the user can provide the URL of the mirror to use for the installation. E.g., http://fr.archive.ubuntu.com/ubuntu. After setting the URL, Subiquity automatically "tests" the mirror by running a minimal apt-get update.
- * Currently, if the test fails, the user can select a different mirror or continue despite the failure. Continuing despite the failure usually leads to an error (and therefore a failed installation) when fetching a package later in the installation.
+ * Currently, if the test fails, the user can select a different mirror or continue despite the failure. Continuing despite the failure usually leads to an error (and therefore a failed installation) when fetching a package at a later during the installation.
  * The other option is for the user to go back to the network screen and disable all the NICs - resulting in a fully offline installation. This is hardly a solution when installing over the network..
  
  Request
  -------
  * Change the behavior (and adjust the TUI) of Subiquity when the user decides to ignore a mirror testing failure. Instead of offering to continue anyway, we will offer to continue without fetching packages from over the network (meaning that only packages from the pool are considered for installation).
  * This will mimic the behavior already implemented for autoinstalls when fallback: offline-install is used [1]
  
  Code to merge
  -------------
  * https://github.com/canonical/subiquity/pull/1968
  
  UI changes
  ----------
  * See the description of the PR, where screen captures are included: https://github.com/canonical/subiquity/pull/1968
  
  [1] https://canonical-subiquity.readthedocs-
  hosted.com/en/latest/reference/autoinstall-reference.html#fallback
  
  What could go wrong
  -------------------
  * The late UI change may lead to translations not being up to date in time for the release.
- * If anybody is using the ability to "continue anyway" in the UI, they might be confused by the sudden behavior change. That being said, there is hardly any valid use-case where "continue anyway" would be a real solution in practice. It was more intended for testing/debugging purposes. Furthermore, people can still skip the test while it is running ; which isn't impacted by this change. 
+ * If anybody is using the ability to "continue anyway" in the UI, they might be confused by the sudden behavior change. That being said, there is hardly any valid use-case where "continue anyway" would be a real solution in practice. It was more intended for testing/debugging purposes. Furthermore, people can still skip the test while it is running ; which isn't impacted by this change.
  
  Original description
  --------------------
  
  verison:ubuntu 24.04 subiquity version
  OS:noble-live-server-amd64.iso
  CPU:AMD EPYC 9634 84-Core Processor*1
  MEMORY: M321R2GA3BB6-CQKVG*2
  ThinkSystem E1.S 5.9mm 7450 PRO 3.84TB Read Intensive NVMe PCIe 4.0 x4 HS SSD
  UEFI MODE
  
  lsb_release -rd: Description:Untun Noble Numbat(development branch)
  Release: 24.04
  
  What you expected to happen:
  Install os on disk with with netwok cable connected,expected to install succefully.
  
  What happened instead:
  Install os with netwok cable connected, install always failed.
  
  we opened this case https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/2057996 to solve nvme disk install fail issue before and we use daily build which build on 3/26 have a try and that version is good working at both of netwok cable connected and disconnected case.
  But for 3/29 daily build version, our QA found when connect cable(It's a local area network (LAN) and it cannot connect to the mirror source), it is always failed and report error:
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Traceback (most recent call last):
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/commands/main.py", line 202, in main
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             ret = args.func(args)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 2224, in curthooks
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             builtin_curthooks(cfg, target, state)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 2048, in builtin_curthooks
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             install_kernel(cfg, target)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 393, in install_kernel
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             install(kernel_package)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 369, in install
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             distro.install_packages([pkg], target=target, env=env)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/distro.py", line 473, in install_packages
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             return install_cmd('install', args=pkglist, opts=opts, target=target,
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/distro.py", line 255, in run_apt_command
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             cmd_rv = apt_install(mode, args, opts=opts, env=env, target=target,
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/distro.py", line 303, in apt_install
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             cmd_rv = inchroot.subp(cmd + dl_opts + packages, env=env,
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/util.py", line 843, in subp
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             return subp(*args, **kwargs)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/util.py", line 323, in subp
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             return _subp(*args, **kwargs)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/util.py", line 172, in _subp
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             raise ProcessExecutionError(stdout=out, stderr=err,
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         curtin.util.ProcessExecutionError: Unexpected error while running command.
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Command: ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'apt-get', '--quiet', '--assume-yes', '--option=Dpkg::options::=--force-unsafe-io', '--option=Dpkg::Options::=--force-confold', 'install', '--download-only', 'linux-generic']
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Exit code: 100
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Reason: -
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Stdout: ''
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Stderr: ''
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Unexpected error while running command.
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Command: ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'apt-get', '--quiet', '--assume-yes', '--option=Dpkg::options::=--force-unsafe-io', '--option=Dpkg::Options::=--force-confold', 'install', '--download-only', 'linux-generic']
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Exit code: 100
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Reason: -
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Stdout: ''
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Stderr: ''
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]: Stderr: ''
  Apr 01 07:15:35 ubuntu-server subiquity_event.3119[3119]:   executing curtin install curthooks step
  Apr 01 07:15:35 ubuntu-server subiquity_event.3119[3119]: installing system
  Apr 01 07:15:35 ubuntu-server subiquity_event.3119[3119]:
  Apr 01 07:15:36 ubuntu-server subiquity_event.3119[3119]:     curtin command install
  Apr 01 07:15:44 ubuntu-server systemd-timesyncd[2495]: Timed out waiting for reply from [2620:2d:4000:1::40]:123 (ntp.ubuntu.com).
  Apr 01 07:15:46 ubuntu-server systemd[1]: systemd-timedated.service: Deactivated successfully.
  
  i uploaded journalctl log on attachment.

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

Title:
  Subiquity fails to download packages after  ignoring mirror test
  result

Status in subiquity:
  In Progress
Status in subiquity package in Ubuntu:
  In Progress

Bug description:
  Context
  -------
  * We have a screen in Subiquity where the user can provide the URL of the mirror to use for the installation. E.g., http://fr.archive.ubuntu.com/ubuntu. After setting the URL, Subiquity automatically "tests" the mirror by running a minimal apt-get update.
  * Currently, if the test fails, the user can select a different mirror or continue despite the failure. Continuing despite the failure usually leads to an error (and therefore a failed installation) when fetching a package at a later during the installation.
  * The other option is for the user to go back to the network screen and disable all the NICs - resulting in a fully offline installation. This is hardly a solution when installing over the network..

  Request
  -------
  * Change the behavior (and adjust the TUI) of Subiquity when the user decides to ignore a mirror testing failure. Instead of offering to continue anyway, we will offer to continue without fetching packages from over the network (meaning that only packages from the pool are considered for installation).
  * This will mimic the behavior already implemented for autoinstalls when fallback: offline-install is used [1]

  Code to merge
  -------------
  * https://github.com/canonical/subiquity/pull/1968

  UI changes
  ----------
  * See the description of the PR, where screen captures are included: https://github.com/canonical/subiquity/pull/1968

  [1] https://canonical-subiquity.readthedocs-
  hosted.com/en/latest/reference/autoinstall-reference.html#fallback

  What could go wrong
  -------------------
  * The late UI change may lead to translations not being up to date in time for the release.
  * If anybody is using the ability to "continue anyway" in the UI, they might be confused by the sudden behavior change. That being said, there is hardly any valid use-case where "continue anyway" would be a real solution in practice. It was more intended for testing/debugging purposes. Furthermore, people can still skip the test while it is running ; which isn't impacted by this change.

  Original description
  --------------------

  verison:ubuntu 24.04 subiquity version
  OS:noble-live-server-amd64.iso
  CPU:AMD EPYC 9634 84-Core Processor*1
  MEMORY: M321R2GA3BB6-CQKVG*2
  ThinkSystem E1.S 5.9mm 7450 PRO 3.84TB Read Intensive NVMe PCIe 4.0 x4 HS SSD
  UEFI MODE

  lsb_release -rd: Description:Untun Noble Numbat(development branch)
  Release: 24.04

  What you expected to happen:
  Install os on disk with with netwok cable connected,expected to install succefully.

  What happened instead:
  Install os with netwok cable connected, install always failed.

  we opened this case https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/2057996 to solve nvme disk install fail issue before and we use daily build which build on 3/26 have a try and that version is good working at both of netwok cable connected and disconnected case.
  But for 3/29 daily build version, our QA found when connect cable(It's a local area network (LAN) and it cannot connect to the mirror source), it is always failed and report error:
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Traceback (most recent call last):
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/commands/main.py", line 202, in main
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             ret = args.func(args)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 2224, in curthooks
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             builtin_curthooks(cfg, target, state)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 2048, in builtin_curthooks
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             install_kernel(cfg, target)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 393, in install_kernel
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             install(kernel_package)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/commands/curthooks.py", line 369, in install
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             distro.install_packages([pkg], target=target, env=env)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/distro.py", line 473, in install_packages
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             return install_cmd('install', args=pkglist, opts=opts, target=target,
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/distro.py", line 255, in run_apt_command
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             cmd_rv = apt_install(mode, args, opts=opts, env=env, target=target,
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/distro.py", line 303, in apt_install
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             cmd_rv = inchroot.subp(cmd + dl_opts + packages, env=env,
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/util.py", line 843, in subp
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             return subp(*args, **kwargs)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/util.py", line 323, in subp
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             return _subp(*args, **kwargs)
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:           File "/snap/subiquity/5645/lib/python3.10/site-packages/curtin/util.py", line 172, in _subp
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:             raise ProcessExecutionError(stdout=out, stderr=err,
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         curtin.util.ProcessExecutionError: Unexpected error while running command.
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Command: ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'apt-get', '--quiet', '--assume-yes', '--option=Dpkg::options::=--force-unsafe-io', '--option=Dpkg::Options::=--force-confold', 'install', '--download-only', 'linux-generic']
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Exit code: 100
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Reason: -
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Stdout: ''
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Stderr: ''
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Unexpected error while running command.
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Command: ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'apt-get', '--quiet', '--assume-yes', '--option=Dpkg::options::=--force-unsafe-io', '--option=Dpkg::Options::=--force-confold', 'install', '--download-only', 'linux-generic']
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Exit code: 100
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Reason: -
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Stdout: ''
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:         Stderr: ''
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]:
  Apr 01 07:15:35 ubuntu-server subiquity_log.3119[4902]: Stderr: ''
  Apr 01 07:15:35 ubuntu-server subiquity_event.3119[3119]:   executing curtin install curthooks step
  Apr 01 07:15:35 ubuntu-server subiquity_event.3119[3119]: installing system
  Apr 01 07:15:35 ubuntu-server subiquity_event.3119[3119]:
  Apr 01 07:15:36 ubuntu-server subiquity_event.3119[3119]:     curtin command install
  Apr 01 07:15:44 ubuntu-server systemd-timesyncd[2495]: Timed out waiting for reply from [2620:2d:4000:1::40]:123 (ntp.ubuntu.com).
  Apr 01 07:15:46 ubuntu-server systemd[1]: systemd-timedated.service: Deactivated successfully.

  i uploaded journalctl log on attachment.

To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/2059898/+subscriptions




More information about the foundations-bugs mailing list