oneiric container problem: missing /run/lock

Bug #880030 reported by xlyz
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Unassigned
Oneiric
Fix Released
Undecided
Unassigned

Bug Description

host: oneiric with server minimal install + lxc + bridge_utils (bridge manually set up)
guest: oneiric

every time the container is started /run/lock is missing.
I then create it manually, and next time is gone again.

============================================
SRU Justification:
1. Impact: /run/lock is missing when starting a container.
2. Development fix: create it at container startup
3. Stable fix: same as development fix
4. Test Case: start container, check for /run/lock
5. Regression potential: we simply create a directory at startup, so it's hard to imagine a regression. If there were one it should affect container startup.
============================================

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug.

This is another side effect stemming from the fact that the kernel doesn't provide a good way to detect poweroff.vs.reboot in containers yet. The workaround is for the container parent to watch the container's /var/run/utmp. As a result of that, we can't let the container mount tmpfs on /var/run, because then the utmp used by the container would be hidden from the parent. As a result of that, /etc/init/mounted-varrun.conf does not run, and that is where /var/run/lock is created.

This should be fixed in lxcguest.conf, which does the other ugly manual recreation of things we want in {/var}/run.

Changed in lxc (Ubuntu):
status: New → Confirmed
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
xlyz (xlyz) wrote :

quick fix to lxc-ubuntu while waiting lxcguest to be fixed (just in case...)

          chroot $rootfs apt-get install --force-yes -y lxcguest
+ # fix for oneiric /var/lock
+ if [ $release = "oneiric" ]; then
+ sudo sed -i '/touch \/var\/run\/utmp/ i\
+ mkdir -p \/run\/lock
+ ' $rootfs/etc/init/lxcguest.conf
+ fi
      fi

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.7.5-0ubuntu10

---------------
lxc (0.7.5-0ubuntu10) precise; urgency=low

  * debian/patches/0009-ubuntu-template-drop-resolvconf.patch:
    Drop resolvconf from package list for oneiric containers. It appears
    to stop containers from getting a useful resolv.conf without doing
    ifdown; ifup; and is apparently unwanted anyway. (LP: #880020)
  * debian/lxcguest.lxcguest.upstart: mkdir /run/lock on boot
    (LP: #880030)
  * debian/fstab.lxc and debian/fstab.libvirt: mount tmpfs on /run/lock,
    not /var/lock (as per new stock /lib/init/fstab).
 -- Serge Hallyn <email address hidden> Mon, 24 Oct 2011 11:45:53 -0500

Changed in lxc (Ubuntu):
status: Triaged → Fix Released
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello xlyz, 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
xlyz (xlyz) wrote :

tested and now is ok.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * debian/patches/0009-ubuntu-template-drop-resolvconf.patch:
    Drop resolvconf from package list for oneiric containers. It appears
    to stop containers from getting a useful resolv.conf without doing
    ifdown; ifup; and is apparently unwanted anyway. (LP: #880020)
  * debian/lxcguest.lxcguest.upstart: mkdir /run/lock on boot
    (LP: #880030)
  * debian/fstab.lxc and debian/fstab.libvirt: mount tmpfs on /run/lock,
    not /var/lock (as per new stock /lib/init/fstab).
 -- Serge Hallyn <email address hidden> Wed, 02 Nov 2011 22:49:42 +0000

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.