images with only core18-based snaps fail to build
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
livecd-rootfs (Ubuntu) |
Fix Released
|
Undecided
|
Robert C Jennings | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Fix Released
|
Undecided
|
Robert C Jennings |
Bug Description
[Impact]
* Building an ubuntu-cpc minimal image by default would have no snaps
installed. When a binary hook seeds a snap that has a core18 base
the build will fail when calling 'snap debug validate-seed' because
the snapd snap is missing.
* Additionally, an image with snaps that only depend on core18 (which
isn't in the ubuntu-
This was found by code inspection and reported in bug #1871912.
[Test Case]
* Build with ubuntu-cpc as that seeds lxd (now that it is based on core18). With the proposed fix the image build should succeed with lxd, core18, and snapd preseeded. The build should not fail and should not include core.
[Regression Potential]
* Image builds fail in some fashion related to snap preseeding. It is unlikely to build an image that fails to pre-seed when booted as we call 'snap debug validate-seed' in the build, which is catching the current bug of omitting snapd with core18.
[Other Info]
* None
[Original description]
Building an ubuntu-cpc minimal image by default would have no snaps
installed. When a binary hook seeds a snap that has a core18 base
the build will fail when calling 'snap debug validate-seed' because
the snapd snap is missing.
Additionally, an image with snaps that only depend on core18 (which
isn't in the ubuntu-
This was found by code inspection and reported in bug #1871912.
We want to build images that only contain the appropriate core image
and when that is not core it should have snapd preseeded.
The _snap_post_process function is meant to install snapd if core18 is the
only core snap installed or remove snapd if core is installed and snapd
was not explicitly installed. But the current logic in _snap_preseed
will never call _snap_post_process. $core_name will never be empty
with the existing logic, and even if it were that would only be for the
'core' snap and we'd miss using the 'core18' logic that pulls in snapd.
Given the case statement in _snap_post_process can handle doing the
right thing given any snap we can just call it unconditionally.
Seeding any snap via snap_preseed will evaluate the base for each snap
and seed the appropriate base. There should be no reason to explicitly
seed the 'core' snap and with snaps moving to 'core18' this will add
'core' without need.
Related branches
- David Krauser (community): Needs Information
- Ubuntu Core Development Team: Pending requested
-
Diff: 44 lines (+7/-11)2 files modifieddebian/changelog (+6/-0)
live-build/functions (+1/-11)
- Steve Langasek: Approve
- Iain Lane: Pending requested
-
Diff: 44 lines (+7/-11)2 files modifieddebian/changelog (+6/-0)
live-build/functions (+1/-11)
description: | updated |
Changed in livecd-rootfs (Ubuntu): | |
assignee: | nobody → Robert C Jennings (rcj) |
status: | Confirmed → Triaged |
Changed in livecd-rootfs (Ubuntu): | |
status: | Triaged → Fix Committed |
description: | updated |
description: | updated |
Changed in livecd-rootfs (Ubuntu Eoan): | |
assignee: | nobody → Robert C Jennings (rcj) |
status: | New → In Progress |
tags: | added: id-5e9058d17e58847a4a41b041 |
Status changed to 'Confirmed' because the bug affects multiple users.