[Bug 2057888] Re: Private store may not contain lxd snap
Aristo Chen
2057888 at bugs.launchpad.net
Sat Apr 6 03:17:57 UTC 2024
> What do you mean?
Previously, when we were using u-i tool 2.x to build 22.04 classic
image, we had a hook(https://git.launchpad.net/~lyoncore-
team/lyoncore/+git/iot-image-builds/tree/hooks/post-populate-
rootfs.d/030-snap-prepare-image.sh?h=classic22.04-uimg2#n17), and the
code was copied from foundation team by one of my colleagues in CE team
AFAIK
> You mean reset the preseeding anyway? Or skip the preseeding entirely?
I am also not sure to understand why your problem is linked to resetting
the preseeding.
I think the root cause is var/lib/snapd/state.json is not handled
properly. By deafult, there is lxd and core20 snap in that
file(var/lib/snapd/state.json), but the customer may not want to include
those snaps in their private store, so skip checking that
file((var/lib/snapd/state.json)) could solve this issue, or probably we
can remove that file(var/lib/snapd/state.json) directly? I am not sure
if remove the file(var/lib/snapd/state.json) will affect any other use
cases, so that's why I think having a flag somewhere(probably in the
yaml?) could be better
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to Ubuntu Image.
https://bugs.launchpad.net/bugs/2057888
Title:
Private store may not contain lxd snap
Status in Ubuntu Image:
Incomplete
Bug description:
Hi,
I defined core22 and snapd in extra-snaps, but the ubuntu-image 3.x
will also try to download lxd snap after downloaded core22 and snapd,
and lxd is actually not included in the private store
If I understand correctly, in internal/statemachine/classic_states.go,
the function prepareClassicImage will try to check the file called
var/lib/snapd/state.json, and tries to preseed the snaps defined in
that file afterwards. However, lxd snap may not be included in private
store, then it will fail to preseed the snap.
Previously in ubuntu-image 2.x, we leveraged the
commit(https://git.launchpad.net/livecd-rootfs/commit/live-
build/functions?id=b43e3b84f4c9100379f4686f80699929c7657056) from
foundation team, I don't know if this mechanism should be integrated
into ubuntu-image 3.x as well? Or maybe we can have a flag to skip
checking var/lib/snapd/state.json?
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-image/+bug/2057888/+subscriptions
More information about the foundations-bugs
mailing list