Using snaps in lxd can be problematic during refresh (using squashfuse)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
Undecided
|
Zygmunt Krynicki |
Bug Description
I recently learned of a work-around to get snaps working in lxd by installing squashfuse. This worked out fantastically well at first glance but it appears it may still need some apparmor tweaking.
I deployed an in-dev etcd charm with snap support, and attempted to move channels. This is consistent regardless of juju or being performed manually
snap install etcd --channel=
snap refresh etcd --channel=
You should see the following in the hosts syslog
Feb 28 09:23:02 makoto kernel: [ 3343.766075] audit: type=1400 audit(148829538
Feb 28 09:23:02 makoto kernel: [ 3343.773237] audit: type=1400 audit(148829538
Which appears that during profile replacement, apparmor is blocking the operation which causes the snap to appear broken. However, if doing a clean placement (install) and not a replacement (refresh) the operation succeeds.
$ snap list
Name Version Rev Developer Notes
canonical-livepatch 7 21 canonical -
charm 2.2 11 charms classic
conjure-up 2.2-dev 104 canonical classic
core 16-2 1337 canonical -
juju-crashdump 1.0.0 4 johnsca classic
rclone current 60 fireeye -
snapcraft 2.27 3 canonical classic
telegram-sergiusens 1.0.14 23 sergiusens -
$ dpkg --list lxd
ii lxd 2.9.3-0ubuntu2~ubun amd64
$ uname -ar
Linux makoto 4.8.0-39-generic #42~16.04.1-Ubuntu SMP Mon Feb 20 15:06:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
description: | updated |
Both of those are "STATUS" messages, indicating the replacement of an apparmor profile. They are not "DENIED" messages so nothing actually got blocked.