ubuntu-server ftbfs in jammy with livecd-rootfs 2.765.34

Bug #2049723 reported by Steve Langasek
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Fix Released
Critical
Unassigned
Jammy
Fix Released
Critical
Utkarsh Gupta
Mantic
Won't Fix
Undecided
Unassigned
Noble
Fix Released
Critical
Unassigned

Bug Description

[Impact]
========

There's a step in the `ubuntu-server` `live` image builds which call `unminimize`.

With changes introduced in LP: #2036725 `unminimize` now calls `lxd`
which on a minimized build/instance will install the lxd snap using the
logic in the `lxd` shim from lxd-installer. Previously `unminimize` used `snap`
directly to install the `lxd` snap and `ubutu-server` `live` image builds diverted `snap` to allow for calling `unminimize` without the snap install step.

This change breaks the `ubuntu-server` `live` image builds.

[Test Plan]
===========

1. Test build of ubuntu-server images with PROPOSED=1 enabled succeed (they have currently been failing for > 1 week)

[Where Problems Could Occur]
=============================

One change we do not want is that the lxd snap is not installed at the stage of calling `unminimize`. We need to ensure this is not the case.

[OG Bug Report]
===============

NEEDRESTART-VER: 3.5
Invoking LXD so that it can be installed by the lxd-installer's script..
Traceback (most recent call last):
  File "<string>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory
/sbin/lxd: 6: exec: /snap/bin/lxd: not found
E: config/hooks/01-unminimize.chroot_early failed (exit non-zero). You should check for errors.
P: Begin unmounting filesystems...

https://launchpad.net/~ubuntu-cdimage/+livefs/ubuntu/jammy/ubuntu-server-live/+build/566145

This is an unminimized image build.

The change that broke this was introduced for LP: #2036725.

Related branches

Revision history for this message
Steve Langasek (vorlon) wrote :

It is non-obvious why this code fails in jammy as on cursory inspection the code is identical between the two branches.

Changed in livecd-rootfs (Ubuntu):
status: New → Invalid
Changed in livecd-rootfs (Ubuntu Jammy):
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Utkarsh Gupta (utkarsh)
tags: added: regression-update
Changed in livecd-rootfs (Ubuntu Jammy):
milestone: none → ubuntu-22.04.4
Revision history for this message
Philip Roche (philroche) wrote :

> This is an unminimized image build.

The recent change @ https://code.launchpad.net/~utkarsh/livecd-rootfs/+git/livecd-rootfs/+merge/458438 depends on lxd-installer package being present on a minimized image to work.

The use case you have here is not one we expected, ie. calling unminimize on an unminimized image - even during build.

It can be resolved by installing lxd-installer package first before you call unminimize.

Revision history for this message
Philip Roche (philroche) wrote :

Or another solution is to divert/mock any calls to `lxd`

Revision history for this message
Philip Roche (philroche) wrote :

I have not tested this yet but a possible solution is defined @ https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/458910

Revision history for this message
Philip Roche (philroche) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

also present in noble; it just hadn't reached the release pocket yet

Changed in livecd-rootfs (Ubuntu):
importance: Undecided → Critical
status: Invalid → Triaged
Philip Roche (philroche)
description: updated
Revision history for this message
Philip Roche (philroche) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 24.04.21

---------------
livecd-rootfs (24.04.21) noble; urgency=medium

  * live-build/functions: avoid losetup -P as it appears to race with udev and
    do it a bit more by-hand instead. (LP: #2045586)

 -- Michael Hudson-Doyle <email address hidden> Thu, 25 Jan 2024 10:28:38 +1300

Changed in livecd-rootfs (Ubuntu Noble):
status: Triaged → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Why is there no mantic task? This code is only used in LTS releases or what?

Revision history for this message
Steve Langasek (vorlon) wrote :

We don't build server images for non LTS releases.

Revision history for this message
Steve Langasek (vorlon) wrote :

(post-release, that is)

Changed in livecd-rootfs (Ubuntu Mantic):
status: New → Won't Fix
Steve Langasek (vorlon)
description: updated
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Steve, or anyone else affected,

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

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. 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 livecd-rootfs (Ubuntu Jammy):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-jammy
Philip Roche (philroche)
tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Philip Roche (philroche) wrote :

I have verified a successful build of ubuntu-server live images for Jammy using the livecd-rootfs 2.765.38 in jammy-proposed. Build artefacts @ https://people.canonical.com/~philroche/20240201-jammy-proposed-ubuntu-server-live-build-LP-2049723

Steve Langasek (vorlon)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.765.38

---------------
livecd-rootfs (2.765.38) jammy; urgency=medium

  * Add a largemem subarch for ubuntu-server that ships a 64k kernel variant
    by default (LP: #2050209)

livecd-rootfs (2.765.37) jammy; urgency=medium

  * fix: Fix for calling unminimize if lxd-installer package
    not installed. (LP: #2049723)

livecd-rootfs (2.765.36) jammy; urgency=medium

  * Use correct /etc/ssh/sshd_config.d/ filename so cloud-init overrides
    via cloud-config works. (LP: #2049860)

 -- Łukasz 'sil2100' Zemczak <email address hidden> Thu, 25 Jan 2024 11:46:49 +0100

Changed in livecd-rootfs (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for livecd-rootfs has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.