lxc-execute fails due to missing /dev/shm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Serge Hallyn | ||
Natty |
Invalid
|
Undecided
|
Unassigned | ||
Oneiric |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The 'lxc-init' (a lightweight init process used by lxc-execute in place of upstart etc) tries to mount /dev/shm during startup. If that fails (for instance /dev/shm does not exist) then it aborts execution and returns -1. This is unreasonable as very few applications actually need /dev/shm.
=======
SRU Justification:
1. Impact: lxc-execute fails
2. Development fix: ignore failure of mounting /dev/shm.
3. Stable fix: same as development fix
4. Test case (on a precise host):
1. lxc-create -t ubuntu -n test1 -- -r oneiric
2. chroot /var/lib/
3. rm -rf /var/lib/
3. lxc-execute -n test1 -- /bin/ls
4. echo $?
This will return 255 without the fix, and return 0 (and show a directory listing) with. (Note that you must add -proposed and upgrade inside the chroot!)
5. Regression potential: none
=======
Changed in lxc (Ubuntu): | |
assignee: | nobody → Serge Hallyn (serge-hallyn) |
importance: | Undecided → Medium |
status: | New → Confirmed |
importance: | Medium → High |
Changed in lxc (Ubuntu Natty): | |
status: | New → Invalid |
description: | updated |
This bug was fixed in the package lxc - 0.7.5-3ubuntu18
---------------
lxc (0.7.5-3ubuntu18) precise; urgency=low
* lxcguest. lxcguest. upstart: emit the net-device-up IFACE=lo event, so lxc-execute- reboot. patch: fix bad handling of 'exit 0' for lxcguest. lxcmount. upstart: add '--no-wait' to emit to make sure we init-ignore- shm.patch: if lxc-init can't mount /dev/shm, don't
that any upstart jobs waiting on it (esp rc-sysinit before oneiric) will
proceed. (LP: #924337)
* 0034-fix-
lxc-execute introduced with the container reboot handling. (LP: #927863)
* debian/
don't wait for the event to be processed.
* 0035-lxc-
fail on account of that. (LP: #927883)
* debian/lxc.init: if the network is already up, exit before setting the
trap EXIT.
-- Serge Hallyn <email address hidden> Mon, 06 Feb 2012 17:37:37 -0600