"snap refresh" doesn't update apparmor rule
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
New
|
Undecided
|
Unassigned |
Bug Description
Install package. Refresh to get new version. Reboot. Service doesn't start because the apparmor rules are for the previous version.
$ snap changes
ID Status Spawn Ready Summary
1 Error 2016-04-
2 Done 2016-04-
3 Done 2016-04-
4 Done 2016-04-
5 Done 2016-04-
6 Done 2016-04-
7 Done 2016-04-
8 Error 2016-04-
9 Error 2016-04-
### that is, 6 installed, 7 upgraded
$ snap changes 6
Status Spawn Ready Summary
Done 2016-04-
Done 2016-04-
Done 2016-04-
Done 2016-04-
Done 2016-04-
$ snap changes 7
Status Spawn Ready Summary
Done 2016-04-
Done 2016-04-
Done 2016-04-
Done 2016-04-
Done 2016-04-
Done 2016-04-
### now reboot
$ journalctl |grep tor-
Apr 21 16:00:18 zippy systemd[1]: Mounting Squashfs mount unit for tor-middle-relay...
Apr 21 16:00:18 zippy systemd[1]: Mounting Squashfs mount unit for tor-middle-relay...
Apr 21 16:00:19 zippy systemd[1]: Mounted Squashfs mount unit for tor-middle-relay.
Apr 21 16:00:19 zippy systemd[1]: Mounted Squashfs mount unit for tor-middle-relay.
Apr 21 16:00:25 zippy audit[2127]: AVC apparmor="STATUS" operation=
Apr 21 16:00:28 zippy systemd[1]: Started service daemon for snap tor-middle-relay - autogenerated DO NO EDIT.
Apr 21 16:00:29 zippy audit[2233]: AVC apparmor="DENIED" operation="open" profile=
Apr 21 16:00:29 zippy ubuntu-
Apr 21 16:00:29 zippy systemd[1]: snap.tor-
Apr 21 16:00:29 zippy systemd[1]: snap.tor-
Apr 21 16:00:29 zippy systemd[1]: snap.tor-
### service did not start! Apparmor denial!
$ grep SNAP_REVISION /var/lib/
@{SNAP_
@{INSTALL_
@{INSTALL_
owner @{HOME}
/var/
/{dev,
/{dev,
### Revision 15 is the old package!
$ mount |grep tor-
/var/lib/
/var/lib/
This looks very much like a dupe of #1572463 - please unduplicate if that is not the case.