Installation fails as 'core snap' not found


#1

Hi all, so I have a snap that is “base: core18”, I launch a fresh bionic container and install it (from the store), it downloads the prereq core18 but then the install hook fails as it can’t find the core snap.

If I manually snap install core and try again it works. I imagine either core should already be there or also have been installed in the process?

The snap is juju-db and I install via: sudo snap install juju-db --edge --jailmode


#2

It’d be useful if you could report the version of snapd you’re using (snap version), and simple steps to reproduce. Along with the output from snap changes.


#3

Oh right, can do.

I create a lxc container and jump in:

lxc launch  ubuntu:bionic test-snap
lxc exec test-snap bash
$ su - ubuntu

snap version gives:

snap    2.34.2+18.04
snapd   2.34.2+18.04
series  16
ubuntu  18.04
kernel  4.15.0-42-generic

snap changes gives:

ID   Status  Spawn               Ready               Summary
1    Done    today at 09:33 UTC  today at 09:33 UTC  Initialize system state
2    Error   today at 09:34 UTC  today at 09:34 UTC  Install "juju-db" snap from "edge" channel
3    Done    today at 09:34 UTC  today at 09:34 UTC  Initialize device

The actual error from the install attempt:

error: cannot perform the following tasks:
- Run install hook of "juju-db" snap if present (run hook "install": cannot locate the core snap: No such file or directory)

Let me know if I can supply any further useful information.


#4

Thanks for your problem report @veebers!

This issue is fixed in https://github.com/snapcore/snapd/pull/6118 which is part of the 2.36 release of snapd. Unfortunately the SRU for this version is not out yet so the bugfix is not in the deb package yet. The SRU will happen today/tomorrow but it takes some days until it hits bionic-updates.

In the meantime one workaround is indeed to install the core snap even though it is not needed for the given snap. Sorry for the trouble!


#5

Excellent, thanks for that @mvo.

Is there a way to track releases? At the moment I’m interested in 2.37 as I’m wanting to make use of the system-files interface.


#6

The 2.37~pre1 should be available in the beta channel for core and the snapd snap soon, probably tomorrow morning (still waiting for a travis test run to merge the last missing PR).