[Bug 1864252] Re: preseeded snap installs fail in images
Jean-Baptiste Lallement
jean-baptiste.lallement at ubuntu.com
Fri Mar 13 06:52:51 UTC 2020
it is not a question of claiming or not claiming, it's a fact.
$ cat /var/log/installer/media-info
Ubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200312)
$ systemd-analyze
Bootup is not yet finished (org.freedesktop.systemd1.Manager.FinishTimestampMonotonic=0).
$ systemctl list-jobs
JOB UNIT TYPE STATE
147 snapd.seeded.service start running
170 zsys-commit.service start waiting
1 graphical.target start waiting
2 multi-user.target start waiting
136 systemd-update-utmp-runlevel.service start waiting
109 snapd.autoimport.service start waiting
6 jobs listed.
$ sudo snap install firefox
[sudo] password for u:
error: too early for operation, device not yet seeded or device model not acknowledged
from the journal:
mars 12 14:31:57 u-Inspiron-13-5378 systemd[1]: Starting Snappy daemon...
mars 12 14:31:58 u-Inspiron-13-5378 snapd[1637]: AppArmor status: apparmor is enabled and all features are available
mars 12 14:31:58 u-Inspiron-13-5378 snapd[1637]: daemon.go:343: started snapd/2.44~pre1+20.04 (series 16; classic) ubuntu/20.04 (amd64) linux/5.4.0-14-generic.
mars 12 14:31:58 u-Inspiron-13-5378 snapd[1637]: daemon.go:436: adjusting startup timeout by 30s (pessimistic estimate of 30s plus 5s per snap)
mars 12 14:31:58 u-Inspiron-13-5378 snapd[1637]: helpers.go:105: error trying to compare the snap system key: system-key missing on disk
mars 12 14:31:58 u-Inspiron-13-5378 systemd[1]: Started Snappy daemon.
mars 12 14:32:02 u-Inspiron-13-5378 snapd[1637]: stateengine.go:150: state ensure error: devicemgr: cannot find signatures with metadata for snap "gnome-3-34-1804" ("/var/lib/snapd/seed/snaps/gnome-3-34-1804_12.snap")
What other log do you need?
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/1864252
Title:
preseeded snap installs fail in images
Status in livecd-rootfs package in Ubuntu:
Fix Released
Status in livecd-rootfs source package in Xenial:
Invalid
Status in livecd-rootfs source package in Bionic:
Fix Released
Status in livecd-rootfs source package in Eoan:
Fix Released
Status in livecd-rootfs source package in Focal:
Fix Released
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/snapd/seed/*)
* Produce an image which does not include snaps by default from the
ubuntu package seed (ubuntu-cpc:minimized does this) but add a snap in
a binary hook. Ensure the base snap for the specified snap is
installed.
* 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/functions. The replacement with the upstream snap cli is equivalent the 'info' and 'download' commands that are used. The snap-tool code is using deprecated APIs which do not provide the data needed for pre-seeding.
* 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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1864252/+subscriptions
More information about the foundations-bugs
mailing list