On core18 system core18 snap was mounted after snapd had started

Bug #1805866 reported by Zygmunt Krynicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Triaged
Medium
Unassigned

Bug Description

Exploring a regression test for another bug I ran across an interesting fragment of a core18/all-snap system log:

Nov 29 15:49:53 localhost snapd[987]: AppArmor status: apparmor is enabled and all features are available

> Here snapd ignores the absence of core18 snap on disk, returning broken snap.Info with no interfaces, apps or hooks. Since this is core18 we add implicit slots but for any other snap this would mean that old security profiles get wiped and nothing has a permission to run.

Nov 29 15:49:53 localhost snapd[987]: helpers.go:662: cannot retrieve info for snap "core18": cannot find installed snap "core18" at revision 461: missing file /snap/core18/461/meta/snap.yaml
Nov 29 15:49:53 localhost snapd[987]: helpers.go:662: cannot retrieve info for snap "core18": cannot find installed snap "core18" at revision 461: missing file /snap/core18/461/meta/snap.yaml
Nov 29 15:49:53 localhost snapd[987]: helpers.go:188: cannot get state of snap "snapd": no state entry for key
Nov 29 15:49:53 localhost audit[991]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/x1/usr/lib/snapd/snap-confine" pid=991 comm="apparmor_parser"
Nov 29 15:49:53 localhost audit[991]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/x1/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=991 comm="apparmor_parser"
Nov 29 15:49:53 localhost kernel: audit: type=1400 audit(1543506593.540:4): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/x1/usr/lib/snapd/snap-confine" pid=991 comm="apparmor_parser"
Nov 29 15:49:53 localhost kernel: audit: type=1400 audit(1543506593.540:5): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/snapd/x1/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=991 comm="apparmor_parser"
Nov 29 15:49:53 localhost snapd[987]: daemon.go:379: started snapd/1337.2.36.1 (series 16; testing) ubuntu-core/18 (amd64) linux/4.15.0-42-generic.
Nov 29 15:49:53 localhost systemd-udevd[598]: Network interface NamePolicy= disabled on kernel command line, ignoring.
Nov 29 15:49:53 localhost systemd[1]: Started Snappy daemon.
Nov 29 15:49:53 localhost systemd[1]: Starting Wait until snapd is fully seeded...
Nov 29 15:49:53 localhost run-snapd-from-snap[678]: daemon.go:611: gracefully waiting for running hooks
Nov 29 15:49:53 localhost run-snapd-from-snap[678]: daemon.go:613: done waiting for running hooks
Nov 29 15:49:53 localhost run-snapd-from-snap[678]: + systemctl restart snapd.socket
Nov 29 15:49:53 localhost systemd[1]: Stopping Snappy daemon...
Nov 29 15:49:53 localhost snapd[987]: main.go:147: Exiting on terminated signal.
Nov 29 15:49:56 localhost systemd[1]: Stopped Snappy daemon.
Nov 29 15:49:56 localhost systemd[1]: Closed Socket activation for snappy daemon.
Nov 29 15:49:56 localhost systemd[1]: Stopping Socket activation for snappy daemon.
Nov 29 15:49:56 localhost systemd[1]: Starting Socket activation for snappy daemon.
Nov 29 15:49:56 localhost systemd[1]: Listening on Socket activation for snappy daemon.
Nov 29 15:49:56 localhost run-snapd-from-snap[678]: + tee -a /dev/console
Nov 29 15:49:56 localhost run-snapd-from-snap[678]: + /usr/bin/snap watch --last=seed
Nov 29 15:49:56 localhost systemd[1]: Starting Snappy daemon...
Nov 29 15:49:56 localhost snapd[1018]: AppArmor status: apparmor is enabled and all features are available
Nov 29 15:49:56 localhost snapd[1018]: helpers.go:662: cannot retrieve info for snap "core18": cannot find installed snap "core18" at revision 461: missing file /snap/core18/461/meta/snap.yaml

> Same problem as above.

Nov 29 15:49:56 localhost snapd[1018]: daemon.go:379: started snapd/1337.2.36.1 (series 16; testing) ubuntu-core/18 (amd64) linux/4.15.0-42-generic.
Nov 29 15:49:56 localhost systemd[1]: Started Snappy daemon.
Nov 29 15:50:00 localhost systemd[1]: Reloading.
Nov 29 15:50:00 localhost systemd[1]: Mounting Mount unit for core18, revision 461...
Nov 29 15:50:00 localhost systemd[1]: Mounted Mount unit for core18, revision 461.

> Hey, core18 revision 461 mounted.

Zygmunt Krynicki (zyga)
Changed in snapd:
status: New → Triaged
importance: Undecided → Medium
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.