sideloaded kernel.snap cannot be removed

Bug #1572178 reported by Gunther Laure
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
Triaged
Medium
Unassigned

Bug Description

I try to install a sideloaded kernel.

sudo snap install livecd.ubuntu-core.kernel.snap
[|] Copy snap "canonical-pc-linux" data

then reboot

After reboot I try to remove the kernel again:
sudo snap remove livecd.ubuntu-core.kernel.snap
error: can't remove "livecd.ubuntu-core.kernel.snap": cannot find snap "livecd.ubuntu-core.kernel.snap"

or

sudo snap remove canonical-pc-linux
error: can't remove "canonical-pc-linux": cannot find mounted snap "canonical-pc-linux" at revision 100001

ubuntu@localhost:~$ sudo snap changes
ID Status Spawn Ready Summary
1 Done 2016-04-19T14:15:20Z 2016-04-19T14:15:20Z Install "/tmp/snapd-sideload-pkg-559884458" snap file
2 Hold 2016-04-19T14:20:02Z - Remove "livecd.ubuntu-core.kernel.snap" snap
3 Hold 2016-04-19T14:20:07Z - Remove "livecd.ubuntu-core.kernel" snap
4 Hold 2016-04-19T14:20:10Z - Remove "livecd.ubuntu-core" snap
5 Error 2016-04-19T14:20:21Z 2016-04-19T14:20:21Z Install "/tmp/snapd-sideload-pkg-074330792" snap file
6 Error 2016-04-19T14:37:03Z 2016-04-19T14:37:03Z Install "/tmp/snapd-sideload-pkg-505839793" snap file
7 Hold 2016-04-19T14:37:27Z - Remove "canonical-pc-linux" snap
8 Hold 2016-04-19T14:39:27Z - Remove "livecd.ubuntu-core.kernel.snap" snap
9 Hold 2016-04-19T14:40:03Z -

Reinstallation also fails:
sudo snap install livecd.ubuntu-core.kernel.snap

error: cannot perform the following tasks:
- Mount snap "canonical-pc-linux" (cannot find mounted snap "canonical-pc-linux" at revision 100001)

Revision history for this message
Michael Vogt (mvo) wrote :

Could you please check if you have version snapd 2.0.2 on your system? I.e. run $ grep snapd /usr/share/snappy/dpkg.list

There was a bug that made mount units not persist accross reboots in versions < 2.0.2. I close this bug but please reopen if you can reproduce this on an image with snapd 2.0.2

Changed in snappy:
status: New → Fix Released
Revision history for this message
Gunther Laure (gunther-laure-e) wrote :

The previous issue was related to snapd 2.0.2 but the bug is still not resolved.

It is not possible to remove any (sideloaded) kernel snap:

ubuntu@localhost:~$ sudo snap remove trionet-kernel
error: can't remove "trionet-kernel": snap "trionet-kernel" is not removable

or:

ubuntu@localhost:~$ sudo snap remove canonical-pc-linux
error: can't remove "canonical-pc-linux": snap "canonical-pc-linux" is not removable
(I did sideload the canonical-pc-linux kernel).

snap changes
ID Status Spawn Ready Summary
1 Done 2016-04-21T06:10:05Z 2016-04-21T06:10:06Z Install "/tmp/snapd-sideload-pkg-883084797" snap file
2 Hold 2016-04-21T06:11:14Z - Remove "livecd.ubuntu-core.kernel.snap" snap
3 Hold 2016-04-21T06:11:36Z - Remove "canonical-pc-linux" snap
4 Done 2016-04-21T06:12:20Z 2016-04-21T06:12:20Z Install "/tmp/snapd-sideload-pkg-590380053" snap file
5 Done 2016-04-21T06:15:01Z 2016-04-21T06:15:01Z Install "/tmp/snapd-sideload-pkg-163806372" snap file
6 Hold 2016-04-21T06:16:25Z - Remove "trionet-kernel" snap
7 Hold 2016-04-21T06:17:23Z - Remove "5" snap
8 Hold 2016-04-21T06:22:10Z - Remove "trionet-kernel" snap
9 Done 2016-04-21T06:23:41Z 2016-04-21T06:23:41Z Install "/tmp/snapd-sideload-pkg-529827863" snap file
10 Hold 2016-04-21T06:23:45Z - Remove "trionet-kernel" snap
11 Hold 2016-04-21T06:23:56Z - Remove "canonical-pc-linux" snap

ubuntu@localhost:~$ snap changes 9
Status Spawn Ready Summary
Done 2016-04-21T06:23:41Z 2016-04-21T06:23:41Z Prepare snap "/tmp/snapd-sideload-pkg-529827863"
Done 2016-04-21T06:23:41Z 2016-04-21T06:23:41Z Mount snap "trionet-kernel"
Done 2016-04-21T06:23:41Z 2016-04-21T06:23:41Z Make current revision for snap "trionet-kernel" unavailable
Done 2016-04-21T06:23:41Z 2016-04-21T06:23:41Z Copy snap "trionet-kernel" data
Done 2016-04-21T06:23:41Z 2016-04-21T06:23:41Z Setup snap "trionet-kernel" security profiles
Done 2016-04-21T06:23:41Z 2016-04-21T06:23:41Z Make snap "trionet-kernel" available to the system

ubuntu@localhost:~$ snap changes 10
Status Spawn Ready Summary

ubuntu@localhost:~$ snap changes 11
Status Spawn Ready Summary

grep snapd /usr/share/snappy/dpkg.list
ii snapd 2.0.2 amd64 Tool to interact with Ubuntu Core Snappy.
ii ubuntu-core-snapd-units 2.0.2 amd64 Scripts for snapd that should only run on ubuntu core systems.

Changed in snappy:
status: Fix Released → New
Michael Vogt (mvo)
Changed in snappy:
status: New → Triaged
importance: Undecided → Medium
Michael Vogt (mvo)
affects: snappy → snapd
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.