lxc-attach needs to mount a /proc for apparmor's use
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Serge Hallyn |
Bug Description
I develop and maintain the unity8-lxc package (lp:unity8-preview-lxc) which uses an unpacked Ubuntu Next Desktop ISO as a privileged rootfs. It uses the lxc-container-
When I try to do a lxc-start. lxc-wait(RUNNING), and lxc-attach for the first time in my setup script, I get the following error:
lxc_container: lsm/apparmor.c: apparmor_
I believe this is a race because if I introduce a sleep of say 0.5 seconds between the lxc-wait and lxc-attach, then it works. It also works for any subsequent lxc-start/
Please let me know if I can provide more info.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: lxc 1.1.2-0ubuntu3
ProcVersionSign
Uname: Linux 3.19.0-16-generic x86_64
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Wed May 6 16:47:14 2015
InstallationDate: Installed on 2013-03-18 (779 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
SourcePackage: lxc
UpgradeStatus: Upgraded to vivid on 2014-10-20 (198 days ago)
Changed in lxc (Ubuntu): | |
status: | Incomplete → Triaged |
importance: | Undecided → Critical |
status: | Triaged → New |
importance: | Critical → High |
Changed in lxc (Ubuntu): | |
status: | Triaged → Fix Released |
Hi,
could you please show a simple script (doing lxc-create && lxc-start && lxc-wait && lxc-attach) that I could reproduce with?
Just to be sure - you get this error running this by hand, right? If it happens at boot time, then you should make sure that the 'lxc' init job has completed before your job begins, since that is the one which will load the apparmor profiles.