snaps fail to install on juju1 deployed lxc container

Bug #1705985 reported by Brad Marshall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Expired
Undecided
Unassigned

Bug Description

When trying to install snaps on a juju1 deployed Xenial lxc container, they fail with a mount error of -1. I'm not sure if this is similar to LP#1611078, but it refers to LXD explicitly, and this is using LXC.

$ sudo snap install hello
error: cannot perform the following tasks:
- Mount snap "core" (2381) ([start snap-core-2381.mount] failed with exit status 1: Job for snap-core-2381.mount failed. See "systemctl status snap-core-2381.mount" and "journalctl -xe" for details.
)

$ systemctl status snap-core-2381.mount
● snap-core-2381.mount - Mount unit for core
   Loaded: loaded (/etc/systemd/system/snap-core-2381.mount; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2017-07-24 05:41:15 UTC; 3min 20s ago
    Where: /snap/core/2381
     What: /var/lib/snapd/snaps/core_2381.snap
  Process: 17327 ExecMount=/bin/mount /var/lib/snapd/snaps/core_2381.snap /snap/core/2381 -t squashfs -o nodev,ro (code=exited, status=3

Jul 24 05:41:15 juju-machine-3-lxc-2 systemd[1]: Mounting Mount unit for core...
Jul 24 05:41:15 juju-machine-3-lxc-2 mount[17327]: mount: /snap/core/2381: mount failed: Unknown error -1
Jul 24 05:41:15 juju-machine-3-lxc-2 systemd[1]: snap-core-2381.mount: Mount process exited, code=exited status=32
Jul 24 05:41:15 juju-machine-3-lxc-2 systemd[1]: Failed to mount Mount unit for core.
Jul 24 05:41:15 juju-machine-3-lxc-2 systemd[1]: snap-core-2381.mount: Unit entered failed state.

And the logs in /var/log/syslog show:

Jul 24 05:41:03 juju-machine-3-lxc-2 /usr/lib/snapd/snapd[10826]: api.go:912: Installing snap "hello" revision unset
Jul 24 05:41:03 juju-machine-3-lxc-2 snapd[10826]: 2017/07/24 05:41:03.640488 api.go:912: Installing snap "hello" revision unset
Jul 24 05:41:04 juju-machine-3-lxc-2 /usr/lib/snapd/snapd[10826]: daemon.go:176: DEBUG: uid=0;@ POST /v2/snaps/hello 696.431643ms 202
Jul 24 05:41:04 juju-machine-3-lxc-2 /usr/lib/snapd/snapd[10826]: taskrunner.go:367: DEBUG: Running task 338 on Do: Download snap "core" (2381) from channel "stable"
Jul 24 05:41:13 juju-machine-3-lxc-2 /usr/lib/snapd/snapd[10826]: taskrunner.go:367: DEBUG: Running task 339 on Do: Fetch and check assertions for snap "core" (2381)
Jul 24 05:41:14 juju-machine-3-lxc-2 /usr/lib/snapd/snapd[10826]: taskrunner.go:367: DEBUG: Running task 340 on Do: Mount snap "core" (2381)
Jul 24 05:41:15 juju-machine-3-lxc-2 systemd[1]: Failed to reset devices.list on /system.slice/snapd.service: Operation not permitted
Jul 24 05:41:15 juju-machine-3-lxc-2 /usr/lib/snapd/snapd[10826]: task.go:303: DEBUG: 2017-07-24T05:41:15Z ERROR [start snap-core-2381.mount] failed with exit status 1: Job for snap-core-2381.mount failed. See "systemctl status snap-core-2381.mount" and "journalctl -xe" for details.
Jul 24 05:41:15 juju-machine-3-lxc-2 /usr/lib/snapd/snapd[10826]: taskrunner.go:367: DEBUG: Running task 338 on Undo: Download snap "core" (2381) from channel "stable"

Please let us know if you need any further information.

Software inside LXC:
$ dpkg-query -W snapd
snapd 2.25

$ uname -a
Linux juju-machine-3-lxc-2 4.10.0-27-generic #30~16.04.2-Ubuntu SMP Thu Jun 29 16:07:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -d
Description: Ubuntu 16.04.2 LTS

Software on metal for LXC:
$ uname -a
Linux sunkern 4.10.0-27-generic #30~16.04.2-Ubuntu SMP Thu Jun 29 16:07:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -d
Description: Ubuntu 16.04.2 LTS

$ dpkg-query -W lxc
lxc 2.0.8-0ubuntu1~16.04.2

Software for juju:
$ lsb_release -d
Description: Ubuntu 14.04.5 LTS

$ juju --version
1.25.11-trusty-amd64

$ uname -a
Linux dile 3.13.0-86-generic #130-Ubuntu SMP Mon Apr 18 18:27:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Oliver Grawert (ogra) wrote :

probably a duplicate of bug 1628289 ... does installing snapfuse fix it ?

Revision history for this message
Brad Marshall (brad-marshall) wrote :

I assume you mean squashfuse instead of snapfuse, and it is already installed in the container, so that's not it. Are there any other dependencies that it could be missing?

$ dpkg-query -W squashfuse
squashfuse 0.1.100-0ubuntu1~ubuntu16.04.1

$ dpkg --list | grep snap
ii libsnappy1v5:amd64 1.1.3-2 amd64 fast compression/decompression library
ii snapd 2.25 amd64 Tool to interact with Ubuntu Core Snappy.

Zygmunt Krynicki (zyga)
affects: snappy → snapd
Changed in snapd:
status: New → Incomplete
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I'm marking this as incomplete. If there was absence of the snap/squash-fuse package it is now automatically bundled by snapd. If there was something else (this is unclear from the information provided thus far) please try to clarify.

For other developers, the return code 32 is MNT_EX_FAIL which libmount is using for a number of situations.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for snapd because there has been no activity for 60 days.]

Changed in snapd:
status: Incomplete → Expired
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.