lxc-execute fails due to missing /dev/shm

Bug #927883 reported by Serge Hallyn
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
High
Serge Hallyn
Declined for Maverick by Martin Pitt
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/lxc/test1/rootfs apt-get install lxc
   3. rm -rf /var/lib/lxc/test1/rootfs/dev/shm # probably not needed
   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
Revision history for this message
Launchpad Janitor (janitor) wrote :

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
    that any upstart jobs waiting on it (esp rc-sysinit before oneiric) will
    proceed. (LP: #924337)
  * 0034-fix-lxc-execute-reboot.patch: fix bad handling of 'exit 0' for
    lxc-execute introduced with the container reboot handling. (LP: #927863)
  * debian/lxcguest.lxcmount.upstart: add '--no-wait' to emit to make sure we
    don't wait for the event to be processed.
  * 0035-lxc-init-ignore-shm.patch: if lxc-init can't mount /dev/shm, don't
    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

Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
Changed in lxc (Ubuntu Natty):
status: New → Invalid
description: updated
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello Serge, or anyone else affected,

Accepted lxc into oneiric-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in lxc (Ubuntu Oneiric):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Works for me now in oneiric-proposed.

tags: added: verification-done
removed: verification-needed
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.7.5-0ubuntu8.5

---------------
lxc (0.7.5-0ubuntu8.5) oneiric-proposed; urgency=low

  * lxcguest.lxcguest.upstart: emit the net-device-up IFACE=lo event, so
    that any upstart jobs waiting on it (esp rc-sysinit before oneiric) will
    proceed. (LP: #924337)
  * 0035-lxc-init-ignore-shm.patch: if lxc-init can't mount /dev/shm, don't
    fail on account of that. (LP: #927883)
 -- Serge Hallyn <email address hidden> Mon, 06 Feb 2012 19:06:46 -0600

Changed in lxc (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.