Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559206 - app-emulation/lxc-1.1.2-r2: error mounting sysfs on /var/lib/lxc/rootfs/sys flags 14
Summary: app-emulation/lxc-1.1.2-r2: error mounting sysfs on /var/lib/lxc/rootfs/sys f...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2015-08-30 21:42 UTC by Jakub Jirutka
Modified: 2015-09-04 00:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jirutka 2015-08-30 21:42:50 UTC
Unprivileged containers fail to start on lxc-1.1.2 (it works on 1.0.7).

This is most likely bug in upstream (https://github.com/lxc/lxc/issues/482), but for the record…

Reproducible: Always

Steps to Reproduce:
1. emerge -av =sys-apps/shadow-4.2*  # needed for running unprivileged container
2. echo 'root:100000:65537' >> /etc/subuid; echo 'root:100000:65537' >> /etc/subgid
3. echo -e 'lxc.id_map = u 0 100000 65536\nlxc.id_map = g 0 100000 65536\nlxc.network.type = none' > test.conf
4. lxc-create -t download -n test -f test.conf -- -d gentoo -r current -a amd64
5. lxc-start -n test -F
Actual Results:  
lxc-start: conf.c: lxc_mount_auto_mounts: 819 Operation not permitted - error mounting sysfs on /var/lib/lxc/rootfs/sys flags 14
lxc-start: conf.c: lxc_setup: 3833 failed to setup the automatic mounts for 'test'
lxc-start: start.c: do_start: 699 failed to setup the container
lxc-start: sync.c: __sync_wait: 51 invalid sequence number 1. expected 2
lxc-start: start.c: __lxc_start: 1164 failed to spawn 'test'
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.

Expected Results:  
Container should start.

$ uname -srmpio
Linux 4.0.8-hardened-intel-v5 x86_64 Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz GenuineIntel GNU/Linux
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2015-09-02 18:34:31 UTC
Not much to do I suppose apart from waiting for a fix upstream
Comment 2 Jakub Jirutka 2015-09-04 00:56:12 UTC
Uh, well, this eventually isn’t a bug in LXC. Full story here: https://github.com/lxc/lxc/issues/482#issuecomment-137612553

Conclusions:

* lxc.network.type=none doesn’t mean what you think and you definitely want 'empty' instead!
* If you run hardened kernel, disable CONFIG_GRKERNSEC_SYSFS_RESTRICT.