[UIFe] Subiquity fails to download packages after ignoring mirror test result

Bug #2059898 reported by wang
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
subiquity
Fix Released
Undecided
Olivier Gayot
subiquity (Ubuntu)
Fix Released
Undecided
Unassigned

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.

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

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

Changed in subiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Jeff Lane  (bladernr) wrote :

Can you confirm, the issue is summarized as thus:
1: NO network cable connected, installation is successful
2: Network cable connected and internet is available, installation is successful
3: Network cable connected, network is available, INTERNET is unavailable (airgapped lab), installation fails

I believe from what you described elsewhere #3 is the case you are seeing, because you are in a lab with no external access, is that correct?

Revision history for this message
Jeremy Bícha (jbicha) wrote :

This is similar to bug 2037008

Revision history for this message
wang (dong28) wrote :

Hi jeff,
Here are the answers:
1: NO network cable connected, installation is successful
yes, after removing network cable, installation is successfully whatever disks(SATA,NVME...) we used.
And when cable disconnected, they can install successfully.

2.Network cable connected and internet is available, installation is successful
The machine's network is our local area network, i think it cannot connect to ubuntu mirror address and cannot connect to internet. And our network proxy is broken, so i am not sure whether it can install successfully when our network can connect to internet. We only confirm when it connect to local area network without internet, it is always failed.

3.Network cable connected, network is available, INTERNET is unavailable (airgapped lab), installation fails
yes in this case, it fails.

I believe from what you described elsewhere #3 is the case you are seeing, because you are in a lab with no external access, is that correct?
yes, correct, and i also confirm #1.

Revision history for this message
wang (dong28) wrote :

hi,
i noticed the latest daily build verison noble-live-server-amd64.iso 2024-04-07 08:26 2.6G.
Does this version include the bug fixes?

Olivier Gayot (ogayot)
tags: added: foundations-todo
Dan Bungert (dbungert)
tags: added: fr-7325
Revision history for this message
Olivier Gayot (ogayot) wrote :

Hi,

We haven't done any fix regarding this bug report yet. What we could try is to change the dialog below so that instead of letting the user continue with what will likely result in an installation failure, we would proceed with an "offline" installation instead.

┌────────────────────────── Mirror check failed ─────────────────────────┐
│ │
│ The check of the mirror URL failed. You can continue, but it is very │
│ likely that the installation will fail. │
│ │
│ [ Cancel ] │
│ [ Continue ] │
│ │
└────────────────────────────────────────────────────────────────────────┘

That said, we probably need to check if such a change would be acceptable for 24.04 since we're way past feature freeze & UI freeze.

Olivier

Revision history for this message
wang (dong28) wrote :

Hi Olivier,
Additional info about the lastest daily build 2024/4/7 8:26 version, Our QA used this version on several machines and found this version can install successfully with the cable connected.
Dong

Dan Bungert (dbungert)
Changed in subiquity:
status: New → In Progress
Changed in subiquity (Ubuntu):
status: Confirmed → In Progress
Olivier Gayot (ogayot)
summary: - ubuntu-24.04 daily build install failed with netwok cable connected
+ Subiquity fails to download packages after linux-generic after waiving
+ mirror test
summary: - Subiquity fails to download packages after linux-generic after waiving
- mirror test
+ Subiquity fails to download packages after waiving mirror test
summary: - Subiquity fails to download packages after waiving mirror test
+ Subiquity fails to download packages after ignoring mirror test result
Revision history for this message
Olivier Gayot (ogayot) wrote : Re: Subiquity fails to download packages after ignoring mirror test result

I opened https://github.com/canonical/subiquity/pull/1968 to implement the change I described above.

Changed in subiquity:
assignee: nobody → Olivier Gayot (ogayot)
Revision history for this message
Olivier Gayot (ogayot) wrote (last edit ):

Subscribed Ubuntu-Release since we need a UI change and we're only two weeks away from the release.

description: updated
description: updated
Olivier Gayot (ogayot)
description: updated
Olivier Gayot (ogayot)
description: updated
Revision history for this message
Dan Bungert (dbungert) wrote :

@bdmurray FYI

Olivier Gayot (ogayot)
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

We're very late, but this fix feels legit. I think an offline install is much safer than just using an 'unsure' mirror. So I approve of this UIFe. However, please inform the documentation and translation teams as per the process here: https://wiki.ubuntu.com/UserInterfaceFreeze

summary: - Subiquity fails to download packages after ignoring mirror test result
+ [UIFe] Subiquity fails to download packages after ignoring mirror test
+ result
Olivier Gayot (ogayot)
Changed in subiquity (Ubuntu):
status: In Progress → Fix Committed
Changed in subiquity:
status: In Progress → Fix Committed
Olivier Gayot (ogayot)
Changed in subiquity:
status: Fix Committed → Fix Released
Changed in subiquity (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.