snap should set up tracking for a daemon if it is explicitly started by a user

Bug #1956917 reported by Maciej Borzecki
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapd
Fix Released
Undecided
Maciej Borzecki

Bug Description

See: https://forum.snapcraft.io/t/session-101-scope-is-not-a-snap-cgroup/28193/4

In short, when invoking the daemon via `snap run foo.bar` yourself rather than under systemd, cgroup tracking will not be established since there is an assumption in /usr/bin/snap that system did that already. The check that verifies tracking in snap is non-fatal and when snap-confine tries to set up device access filtering, execution is stopped with an error, since the process is user's cgroup (typically the user session scope).

Since it should be possible to start the daemon manually, /usr/bin/snap should try to setup a tracking cgroup if none was found.

Changed in snapd:
assignee: nobody → Maciej Borzecki (maciek-borzecki)
status: New → In Progress
Changed in snapd:
status: In Progress → Fix Committed
Changed in snapd:
status: Fix Committed → Fix Released
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.