snap-confine regression when running commands as root
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snap-confine |
Fix Released
|
High
|
Zygmunt Krynicki | ||
snap-confine (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Snaps (even in running in devmode) cannot put any files in the /root directory.
This bug is fixed by adding /root 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.
* This bug was included in an earlier SRU and is now fixed in Ubuntu. I am updating the template here to ensure that the process is fully documented from 1.0.38 all the way up to 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 # ==
root@edfu:~# lxd.lxc list
+------
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------
| blah | STOPPED | | | PERSISTENT | 0 |
+------
root@edfu:~# dpkg -l | grep core-launcher
ii ubuntu-
root@edfu:~# sudo apt install ubuntu-
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
snap-confine
The following NEW packages will be installed:
snap-confine
The following packages will be upgraded:
ubuntu-
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 23.1 kB of archives.
After this operation, 51.2 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://
Get:2 http://
Fetched 23.1 kB in 0s (0 B/s)
(Reading database ... 101267 files and directories currently installed.)
Preparing to unpack .../ubuntu-
Unpacking ubuntu-
Selecting previously unselected package snap-confine.
Preparing to unpack .../snap-
Unpacking snap-confine (1.0.38-
Processing triggers for man-db (2.7.5-1) ...
Setting up snap-confine (1.0.38-
Setting up ubuntu-
Removing obsolete conffile /etc/apparmor.
root@edfu:~# lxd.lxc list
error: mkdir /root/snap: read-only file system
So looks like /root/snap isn't bind-mounted anymore. I also had to set HOME for my daemon to point to /tmp as apparently that's not set anymore either, causing HOME in my daemon to resolve to / which obviously is read-only.
summary: |
- snapd-confine regression when running commands as root + snap-confine regression when running commands as root |
tags: | added: lxd |
Changed in snappy: | |
status: | New → In Progress |
assignee: | nobody → Zygmunt Krynicki (zyga) |
importance: | Undecided → High |
affects: | snappy → snap-confine |
Changed in snap-confine: | |
milestone: | none → 1.0.40 |
Changed in snap-confine: | |
status: | In Progress → Fix Committed |
Changed in snap-confine: | |
status: | Fix Committed → Fix Released |
description: | updated |
Changed in snap-confine (Ubuntu): | |
status: | New → Fix Released |
Changed in snap-confine (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in snap-confine (Ubuntu Xenial): | |
status: | Fix Committed → Fix Released |
This is fixed by https:/ /github. com/snapcore/ snap-confine/ pull/95