Allow access to the currently running kernel sources from /usr/src
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Snappy |
Undecided
|
Unassigned | ||
| snap-confine |
High
|
Jamie Strandboge | ||
| snap-confine (Ubuntu) |
Undecided
|
Unassigned | ||
| Xenial |
Undecided
|
Unassigned |
Bug Description
[Impact]
Snaps (even in running in devmode) cannot access the /usr/src directory.
This bug is fixed by adding /usr/src to a list of directories that are bind mounted and thus visible to snaps in their execution environment.
For more information about the execution environment, please see this article http://
[Test Case]
The test case can be found here:
https:/
The test case is ran automatically for each pull request and for each final release. It can be reproduced manually by executing the shell commands listed in the prepare/
The commands there assume that snapd and snap-confine are installed.
No other additional setup is necessary.
[Regression Potential]
* Regression potential is minimal as the fix simply adds another directory to a list of directories that needs to be bind mounted.
* The fix was tested on Ubuntu via spread and on several other distributions successfully.
[Other Info]
* This bug is a part of a major SRU that brings snap-confine in Ubuntu 16.04 in line with the current upstream release 1.0.41.
* snap-confine is technically an integral part of snapd which has an SRU exception and is allowed to introduce new features and take advantage of accelerated procedure. For more information see https:/
== # Pre-SRU bug description follows # ==
This issue is a fork of https:/
The reported there required access to /usr/src having the sources for the kernel headers.
I think this is something that could be handled by a dedicated interface or perhaps directly with the new content-sharing interface. We would have to be careful on how this works but on classic we could expose /usr/src this way.
tags: | added: snapd-interfaces |
Changed in snap-confine: | |
status: | New → Confirmed |
Changed in snappy: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
Changed in snap-confine: | |
importance: | Undecided → Wishlist |
Jamie Strandboge (jdstrand) wrote : | #1 |
Changed in snap-confine: | |
assignee: | nobody → Jamie Strandboge (jdstrand) |
Changed in snappy: | |
assignee: | nobody → Jamie Strandboge (jdstrand) |
Jamie Strandboge (jdstrand) wrote : | #2 |
Moving the final solution to bug #1609499. This bug will track mounting /usr/src in the short term.
Changed in snappy: | |
assignee: | Jamie Strandboge (jdstrand) → nobody |
importance: | Wishlist → Undecided |
status: | Confirmed → Invalid |
Changed in snap-confine: | |
status: | Confirmed → In Progress |
importance: | Wishlist → Medium |
importance: | Medium → High |
Jamie Strandboge (jdstrand) wrote : | #3 |
This is merged in trunk now.
Changed in snap-confine: | |
status: | In Progress → Fix Committed |
Zygmunt Krynicki (zyga) wrote : | #4 |
I plan to do a new upstream release shortly so this will start to be available to distributors.
Changed in snap-confine: | |
milestone: | none → 1.0.40 |
Changed in snap-confine: | |
status: | Fix Committed → Fix Released |
Hello Zygmunt, or anyone else affected,
Accepted snap-confine into xenial-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
Changed in snap-confine (Ubuntu): | |
status: | New → Fix Released |
Changed in snap-confine (Ubuntu Xenial): | |
status: | New → Fix Committed |
tags: | added: verification-needed |
description: | updated |
Zygmunt Krynicki (zyga) wrote : | #6 |
The version 1.0.38-
As such the apparmor side of this bug is fixed but the main part is not fixed. The main part of this bug is fixed in the 1.0.41 (and beyond) which stops with the cherry picking and updates all of snap-confine to match the tested upstream release code.
description: | updated |
Zygmunt Krynicki (zyga) wrote : | #7 |
Marking as verification-done per discussion with pitti. This will be updated again with the 1.0.41-0ubuntu0 update.
tags: |
added: verification-done removed: verification-needed |
Launchpad Janitor (janitor) wrote : | #8 |
This bug was fixed in the package snap-confine - 1.0.38-
---------------
snap-confine (1.0.38-
* debian/
- synchronize apparmor profile with upstream 1.0.40 release.
(LP: #1597842, LP: #1615113, LP: #1584456)
snap-confine (1.0.38-
* debian/
- move to /var/lib/snapd/void (with mode 0) if the current
location cannot be preserved (LP: #1612684)
-- Zygmunt Krynicki <email address hidden> Wed, 24 Aug 2016 20:31:12 +0200
Changed in snap-confine (Ubuntu Xenial): | |
status: | Fix Committed → Fix Released |
Andy Whitcroft (apw) wrote : Update Released | #9 |
The verification of the Stable Release Update for snap-confine has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
Since I've been looking at interfaces in support of bcc, I looked into this and agree this should be handled in the interfaces for a proper solution. One way to do this would be to allow the .fstab parsing to allow OS/classic mounts somehow instead of just snap mounts, then interfaces could declare what OS/classic mounts to add instead of hard-coding them in snap-confine.
More concretely, rather than unconditionally bind mounting /var/log in snap-confine, the log-observe interface would add an entry to .fstab on interface connect. In this manner, only the snaps that are connected to log-observe get the additional bind mount, which is a cleaner runtime and easier to maintain. The same could be done with /usr/src.
In the meantime for /usr/src however I plan to add /usr/src to the list of OS mounts in snap-confine to unblock the bcc snap, then circle back around and do the above. As such, assigning this bug to me.