[SRU] PXE Boot contains wrong suggested link to ISO for live file system

Bug #1990621 reported by James Verbunk
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
Fix Released
Low
Dominik Viererbe
Jammy
Fix Committed
Low
Dominik Viererbe
linux (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Invalid
Undecided
Unassigned

Bug Description

[ Impact ]

 * What are the effects of the bug on users?
   casper's intercative netmount fails to download the latest
   Ubuntu LTS ISOs after the release of the first point release
   (e.g. 22.04.1)

 * What is the justification for backporting the fix to the
   There are at least 2 bug reports about this problem
   (LP: #1990621, #1948884) and this fix will improve the
   user experience with a low probaility of side effects.

 * How does the upload fix the bug?

   - The patch adds a '-latest' to the download URLs (see more
     details here: https://git.launchpad.net/casper/diff/scripts/casper?id=5075686ba44c942e58c71d2c99076fe72fe64022).
   - Additionaly Łukasz Zemczak (sil2100) created symlinks that
     (as the name of the urls imply) always points to the latest
     Ubuntu ISO for a given version.

[ Test Plan ]

 * How to reproduce the bug?

   - Just run the failling parts of the casper script on a
     22.04.1 <= x < 22.10 machine:

     # would normally be set by initramfs-tools
     $ DPKG_ARCH=amd64

     # sets UBUNTU_CODENAME=jammy and VERSION_ID="22.04"
     $ source /etc/os-release

     # see https://git.launchpad.net/casper/tree/scripts/casper?id=eb5ef85cb33fba28f9ae6e8da6194aaa521d5a49#n388
     $ server_url=https://releases.ubuntu.com/$UBUNTU_CODENAME/ubuntu-$VERSION_ID-live-server-$DPKG_ARCH.iso

     # see https://git.launchpad.net/casper/tree/scripts/casper?id=eb5ef85cb33fba28f9ae6e8da6194aaa521d5a49#n267
     $ wget "${server_url}" -O /dev/null

     # You should observe an ERROR 404: Not Found.

 * Test that the new links work:
   - Test Script: https://gist.github.com/dviererbe/0255733d25a27c9a3ddc0bfc9535c243
   - New -latest URLs
     - https://releases.ubuntu.com/jammy/ubuntu-22.04-latest-live-server-amd64.iso
     - https://releases.ubuntu.com/jammy/ubuntu-22.04-latest-desktop-amd64.iso
     - http://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04-latest-live-server-arm64.iso
     - http://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04-latest-live-server-ppc64el.iso
     - http://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04-latest-live-server-s390x.iso

 * Łukasz Zemczak (sil2100) tested that casper can handle
   HTTP 301 redirects. (See https://code.launchpad.net/~dviererbe/casper/+git/casper/+merge/446497/comments/1193559)

[ Where problems could occur ]

 * The Ubuntu Release Team could forget or the automation
   could stop working to update the -latest links, but this
   would, in the worst case, result in a not more worse
   situation than the current bug.

[ Other Info ]

 * Nick Rosbrook (enr0n) pointed out in comment #3 that the
   script allows the user to provide their own url.
   This should only be considered a temporary workaround as
   a user has to be aware of this bug and has to aquire a
   URL by themself. Copy & pasting URLs from the web is
   potentialy error prone and unsafe.

 * As far as I am aware, there was a discussion between
   Łukasz Zemczak (sil2100), Brian Murray (brian-murray) and
   Steve Langasek (~vorlon) about the link namining. Neither
   was particularly happy about the current solution, but no
   better solution was found.

 * Original Bug report:

When PXE booting without pulling in squashfs correctly the system tried to be helpful (:-) and grab an ISO. The 22.04.1 Jammy release contains a link to the old version which is not present anymore.

-------
Unable to find a medium containing a live file system
Attempt interactive netboot from a URL?
yes no (default yes):
Two methods available for IP configuration:
  * static: for static IP configuration
  * dhcp: for automatic IP configuration
static dhcp (default 'dhcp'):
vlan id (optional):
 https://releases.ubuntu.com/jammy/ubuntu-22.04-live-server-amd64.iso (default)
 https://releases.ubuntu.com/jammy/ubuntu-22.04-desktop-amd64.iso
url:
http_proxy (optional):
[ 125.454385] igb 0000:00:14.0 eno1: igb: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
[ 125.566067] IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready
Begin: Trying netboot from 10.0.~.1: ... Begin: Trying to download and mount https://releases.ubuntu.com/jammy/ubuntu-22.04-live-server-amd64.iso ...

BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu3) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) Connecting to releases.ubuntu.com (185.125.190.37:443)
wget: server returned error: HTTP/1.1 404 Not Found
done.
Unable to find a medium containing a live file system

Related branches

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1990621

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
jeremyszu (os369510) wrote : Re: PXE Boot contains wrong suggested link to ISO for live file system
Dave Jones (waveform)
tags: added: foundations-todo
Revision history for this message
Nick Rosbrook (enr0n) wrote :

> and which gets from "/etc/os-release/"

Yes, maybe casper should be parsing $VERSION (which contains the point release number), rather than using $VERSION_ID to build the default iso URL.

Note however that the script does allow the user to provide their own url, i.e. when it prompts "url:" as shown above:

Attempt interactive netboot from a URL?
yes no (default yes):
[... snip ...]
 https://releases.ubuntu.com/jammy/ubuntu-22.04-live-server-amd64.iso (default)
 https://releases.ubuntu.com/jammy/ubuntu-22.04-desktop-amd64.iso
url: <---- This prompt

Changed in linux (Ubuntu):
status: Incomplete → Invalid
Changed in linux (Ubuntu Jammy):
status: New → Invalid
Changed in casper (Ubuntu Jammy):
status: New → Triaged
Changed in casper (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Changed in casper (Ubuntu Jammy):
importance: Undecided → Low
Revision history for this message
Dominik Viererbe (dviererbe) wrote (last edit ):

I did some research today. I think this bug affects all LTS releases.

As Nick Rosbrook (enr0n) suggested we can use $VERSION to parse the version id with the point release number like this $(echo "$VERSION"| grep -o -s -E '^[0-9\.]+')
, but this would still not fix the bug for all LTS users who haven't the most up to date /etc/os-release file.

For example:
When 22.04.02 gets released; a user that hasn't updated yet still has an /etc/os-release file with the value VERSION="22.04.1 LTS (Jammy Jellyfish)"
This would still result in a broken link.

Alternative solutions would be:
1. using a web-crawler that looks for the latest release url (overcomplicated)
2. setting up a redirection from the "broken" url to the correct one

Alternative 2 would result in an instant-fix without needing the user to update and is simple. I have to find out who I would need to ask for that.

Changed in casper (Ubuntu Jammy):
assignee: nobody → Dominik Viererbe (dviererbe)
Changed in casper (Ubuntu):
assignee: nobody → Dominik Viererbe (dviererbe)
Revision history for this message
Dominik Viererbe (dviererbe) wrote :

Here is a possible implementation for parsing the point release number from "$VERSION.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "LP#1990621-bugfix.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Dominik Viererbe (dviererbe) wrote :

I talked today to Łukasz Zemczak (sil2100) about the redirection. He made some pretty good arguments that the name of the URL should match a user's expectations.

E.g. a User could assume the URL "https://releases.ubuntu.com/jammy/ubuntu-22.04-live-server-amd64.iso" will provide the initial version of 22.04 and not the latest point release.

I suggested a URL style like this "https://releases.ubuntu.com/jammy/ubuntu-22.04-latest-live-server-amd64.iso" (notice the "-latest" after the version id).

Revision history for this message
Dan Bungert (dbungert) wrote :

Hi Dominik,

Some suggestions:
* I like that we are disambiguating obtaining 22.04.0 versus something that acquires the latest version. I think that's a nice improvement overall, not just for casper.
* I believe that creating the backend for those -latest URLs would need ubuntu-cdimage changes
* Assuming the above will be done, we'll want that -latest support in casper on main branch first. But presumably constrained to LTS ISOs.
* A debdiff is entirely fine, or you may find it more convenient to propose MPs against https://git.launchpad.net/casper

In the meantime I'm unsubscribing Ubuntu Sponsors, please consider all the above. Thanks!

Revision history for this message
Dominik Viererbe (dviererbe) wrote :

Łukasz Zemczak (sil2100) gave me the greenlight to implement the "-latest" solution.

You can find the merge proposal here: https://code.launchpad.net/~dviererbe/casper/+git/casper/+merge/446497

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

This bug was fixed in the package casper - 1.482

---------------
casper (1.482) mantic; urgency=medium

  * scripts/casper: Use '-latest' links to download images (LP: #1990621).

 -- Dominik Viererbe <email address hidden> Tue, 11 Jul 2023 14:03:33 +0300

Changed in casper (Ubuntu):
status: Triaged → Fix Released
description: updated
summary: - PXE Boot contains wrong suggested link to ISO for live file system
+ [SRU] PXE Boot contains wrong suggested link to ISO for live file system
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello James, or anyone else affected,

Accepted casper into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/casper/1.470.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To properly test it you will need to obtain and boot a daily build of a Live CD for jammy. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in casper (Ubuntu Jammy):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-jammy
tags: removed: foundations-todo
Revision history for this message
Chris Guiver (guiverc) wrote (last edit ):

Mostly to sil2100

The casper 1.470.3 was contained on the 20230801 Lubuntu ISO (jammy) which was used in some testing. (amd64)

A scan of our testing (QA) checklist ( https://phab.lubuntu.me/w/release-team/testing-checklist/ ) and ISO column will show the install types... Or https://iso.qa.ubuntu.com/qatracker/milestones/429/builds/283753/testcases/1701/results

I have NOT marked it verification-done-jammy as this is noticed today, but the manifest for the ISO tested contained

---
calamares 3.2.61-0ubuntu0.1
calamares-settings-lubuntu 1:22.04.4.3
calamares-settings-ubuntu-common 1:22.04.4.3
casper 1.470.3
chafa 1.8.0-1
---

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.