Snapd needs user-level hooks

Bug #1757486 reported by Kyle Fazzari
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
Triaged
Medium
Unassigned

Bug Description

Snapd currently contains a number of hooks that are run during installation/refresh, such as the install hook, configure hook, and {pre,post}-refresh hooks. If any of these hooks return non-zero during a refresh, snapd rolls the update back (or aborts the initial install), which is nice, and makes these hooks a good place to run a health check of some kind to ensure the update works. However, doing that only works if what one needs to health check is some sort of headless system service. It doesn't work well for user applications (e.g. skype, slack) because the hooks run as root. It also means hooks can never do anything meaningful in $SNAP_USER_{COMMON,DATA}.

Tags: isv
Kyle Fazzari (kyrofa)
description: updated
tags: added: isv
Revision history for this message
Evan (ev) wrote :

If it's just about needing an X server, I wonder if we could come up with an interim example that users root-level hooks with xvfb-run.

Revision history for this message
Evan (ev) wrote :

The Snapcraft team and I spoke about this more and pulling in xvfb-run would also pull in the X stack, which is too much.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I think health checks need more work in general and should be tailored to behave better for desktop applications. I don't know if we should solve it with user-level hooks though (exact semantics is unclear to me).

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.