preseeded snap installs fail in images
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
livecd-rootfs (Ubuntu) |
Fix Released
|
High
|
Robert C Jennings | ||
Bionic |
Fix Released
|
High
|
Unassigned | ||
Eoan |
Fix Released
|
High
|
Unassigned | ||
Focal |
Fix Released
|
High
|
Robert C Jennings |
Bug Description
[Impact]
Images built with pre-seeded snaps contain insufficient assertion data causing boot to fail.
The snaps for seeding are downloaded with a custom snap tool for an earlier cohort API (now deprecated). The assertions that it pulls are incomplete. We could update that list and move to the new API but at this time the snap-tool provides no value compared to use of the snap CLI (cohort support has moved to the cli as well). The development overhead of maintaining snap-tool in livecd-rootfs are not warranted.
This patch removes the bespoke snap-tool and relies on the snap CLI instead.
[Test Case]
* Produce images that include preseeded snaps (in /var/lib/
* Produce an image which does not include snaps by default from the ubuntu package seed (ubuntu-
* Boot the resulting image and ensure that the snapd.seeded unit is successful and the snaps (from the correct channels) show up in 'snap list'
[Regression Potential]
* The interface for these two tools is consistent and the output should be the same. There's always a chance that snap-tool had quirks which a move to the snap CLI uncovers, where the result would be different snaps seeded from before the change. An example would be channel differences before and after this change. I haven't seen issues in my testing and I do think it's unlikely, mostly I'm suspicious of SRUs that don't list any regression potentials.
[Other Info]
* The snap-tool that is being removed is used only in livecd-rootfs through live-build/
* The attached MP for Xenial is simpler as it never had snap-tool. The Xenial MP is a minor change to give us parity between releases for use of the snap cohort key during download.
Related branches
- Ubuntu Core Development Team: Pending requested
-
Diff: 35 lines (+8/-1)2 files modifieddebian/changelog (+6/-0)
live-build/functions (+2/-1)
- Steve Langasek: Needs Fixing
- Philip Roche: Pending requested
-
Diff: 688 lines (+19/-616)4 files modifieddebian/changelog (+7/-0)
debian/install (+0/-1)
dev/null (+0/-603)
live-build/functions (+12/-12)
- Steve Langasek: Approve
-
Diff: 51 lines (+15/-6)2 files modifieddebian/changelog (+6/-0)
live-build/functions (+9/-6)
- David Krauser (community): Approve
- Ubuntu Core Development Team: Pending requested
-
Diff: 51 lines (+15/-6)2 files modifieddebian/changelog (+6/-0)
live-build/functions (+9/-6)
- Brian Murray: Approve
- Philip Roche (community): Approve
-
Diff: 659 lines (+9/-610)4 files modifieddebian/changelog (+6/-0)
debian/install (+0/-1)
dev/null (+0/-603)
live-build/functions (+3/-6)
- Robert C Jennings (community): Abstain
- Brian Murray: Needs Fixing
- Philip Roche (community): Approve
-
Diff: 26 lines (+7/-0)2 files modifieddebian/changelog (+6/-0)
live-build/functions (+1/-0)
description: | updated |
Changed in livecd-rootfs (Ubuntu): | |
assignee: | nobody → Robert C Jennings (rcj) |
description: | updated |
description: | updated |
Changed in livecd-rootfs (Ubuntu Xenial): | |
status: | New → In Progress |
assignee: | nobody → Brian Murray (brian-murray) |
Changed in livecd-rootfs (Ubuntu Bionic): | |
status: | New → Confirmed |
Changed in livecd-rootfs (Ubuntu Eoan): | |
status: | New → Confirmed |
Changed in livecd-rootfs (Ubuntu): | |
importance: | Undecided → High |
Changed in livecd-rootfs (Ubuntu Xenial): | |
importance: | Undecided → High |
Changed in livecd-rootfs (Ubuntu Bionic): | |
importance: | Undecided → High |
Changed in livecd-rootfs (Ubuntu Eoan): | |
importance: | Undecided → High |
Changed in livecd-rootfs (Ubuntu): | |
status: | Confirmed → Fix Released |
description: | updated |
Changed in livecd-rootfs (Ubuntu Xenial): | |
status: | In Progress → Invalid |
assignee: | Brian Murray (brian-murray) → nobody |
tags: | added: id-5e5051a4e00bad81f435391c |
tags: | added: id-5e4efeb8f00ff60ed69d009d |
no longer affects: | livecd-rootfs (Ubuntu Xenial) |
All of the MPs have been tested per the plan in the description. For eoan (where we have lxd seeded in the base image) the ubuntu-cpc project was built and the qcow2 image booted in kvm to verify the snaps. For bionic and xenial (where no snaps are seeded in the image set) I tested with the ubuntu-cpc project with a binary hook that seeded lxd.