Snap removal hangs inside LXD container

Bug #1691999 reported by Alberto Donato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned

Bug Description

When trying to remove a locally-installed snap I'm developing, I get the following error:

$ snap list
Name Version Rev Developer Notes
core 16-2 1689 canonical -
$ sudo snap install --dangerous basic-auth-service_0.1-git+bbae0ca_amd64.snap
basic-auth-service 0.1-git+bbae0ca installed
$ snap list
Name Version Rev Developer Notes
basic-auth-service 0.1-git+bbae0ca x1 -
core 16-2 1689 canonical -
$ sudo snap remove basic-auth-service
2017-05-19T10:45:47Z ERROR cannot remove snap file "basic-auth-service", will retry in 3 mins: [stop snap-basic\x2dauth\x2dservice-x1.mount] failed with exit status 1: Job for snap-basic\x2dauth\x2dservice-x1.mount failed. See "systemctl status "snap-basic\\x2dauth\\x2dservice-x1.mount"" and "journalctl -xe" for details.

[/] Remove snap "basic-auth-service" (x1) from the system

snap seemps to spin forever trying to remove it.
If I reboot the machine and manually kill the squashfuse instance for the snap, it eventually gets into the disabled,broken state and gets removed.

This happens in a xenial LXD container (under LXD 2.13), with the following snap version:

$ snap --version
snap 2.25
snapd 2.25
series 16
ubuntu 16.04
kernel 4.8.0-49-generic

The same snap installs/removes fine on a physical host

Alberto Donato (ack)
summary: - Snap removal hangs
+ Snap removal hangs inside LXD container
description: updated
Revision history for this message
Alberto Donato (ack) wrote :

I still see this behavior with 2.27.5

Inside a newly created LXD container, I installed the hello-world snap.

When I try to remove it, I get the following:

$ sudo snap remove hello-world
2017-09-08T07:36:30Z ERROR cannot remove snap file "hello-world", will retry in 3 mins: [stop snap-hello\x2dworld-27.mount] failed with exit status 1: Job for snap-hello\x2dworld-27.mount failed. See "systemctl status "snap-hello\\x2dworld-27.mount"" and "journalctl -xe" for details.

[|] Remove snap "hello-world" (27) from the system

then snap is stuck trying to remove

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.