LXD snap not being installed from the right channel when running unminimize

Bug #2036725 reported by Utkarsh Gupta
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Utkarsh Gupta
Jammy
New
Undecided
Unassigned
Lunar
New
Undecided
Unassigned

Bug Description

[Impact]
========

There's a step in `unminimize` where it installs the LXD snap. The problem is that it doesn't mention any channel where to install it from. So often it happens that we have the LXD snap on 20.04 or 22.04 from the latest/stable channel (as that's the default!).

However, we should be installing this from stable/ubuntu-20.04 or stable/ubuntu-22.04 (or equivalent) channel.

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

$ lxc launch ubuntu-minimal-daily:jammy jtemp --vm
$ lxc shell jtemp
# apt update
# unminimize
# snap list | grep 'lxd' | awk '{print $4}'

You'll see that it's NOT from stable/ubuntu-$VERSION, whereas it should be. ;)

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

There's very smol room for error especially when the patch only introduces the following to the snap install call: --channel="stable/ubuntu-$VERSION_ID"

But things might behave differently IFF someone has tampered their /etc/os-release OR/AND fiddled with the unminimize script to do a different thing. :)

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

In the past, when running unminimize, we'd directly do:
snap install lxd
(cf: https://git.launchpad.net/livecd-rootfs/tree/live-build/auto/build#n322)

which defaults to the latest/stable channel. However, whilst working on enhancing unminimize, it was observed that we install this snap from the stable/ubuntu-<version> channel instead.

This was also noted as a failure when running the CTF tests:
`lxd installed from latest/stable, not stable/ubuntu-23.10`

Related branches

Utkarsh Gupta (utkarsh)
Changed in livecd-rootfs (Ubuntu):
assignee: nobody → Utkarsh Gupta (utkarsh)
Utkarsh Gupta (utkarsh)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
livecd-rootfs (23.10.44) mantic; urgency=medium

  * Fix the subarch used in the hook to identify images for sifive
    unmatched. LP: #2037060.

 -- Steve Langasek <email address hidden> Fri, 22 Sep 2023 10:58:57 -0700

Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

This bug has an upload in the unapproved queue, but does not have an SRU bug template [1].
Could you please add it? Thanks!

[1] https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Marking as incomplete pending the SRU template.

Changed in livecd-rootfs (Ubuntu Jammy):
status: New → Incomplete
Changed in livecd-rootfs (Ubuntu Lunar):
status: New → Incomplete
Utkarsh Gupta (utkarsh)
description: updated
Utkarsh Gupta (utkarsh)
description: updated
Changed in livecd-rootfs (Ubuntu Jammy):
status: Incomplete → New
Changed in livecd-rootfs (Ubuntu Lunar):
status: Incomplete → New
Utkarsh Gupta (utkarsh)
description: updated
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.