lxc-start-ephemeral hangs if bind mounting nfs homedir

Bug #1051080 reported by Dan Kegel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Quantal
Fix Released
Undecided
Unassigned
lxc (Ubuntu)
Invalid
Medium
Unassigned
Precise
Invalid
Undecided
Unassigned
Quantal
Invalid
Medium
Unassigned

Bug Description

On Ubuntu 12.04.1, ephemeral containers seem to conflict with NFS home directories.

The user's home directory is on a remote NFS server.
The original container is created with
  sudo lxc-create -t ubuntu -n foobar -- -r lucid --bindhome $LOGNAME
The ephemeral container is started with
  lxc-start-ephemeral -o foobar
The user logs in to the ephemeral container. This hangs.

After that, any reference to the home directory -- inside or outside of the container -- seems to hang.

mount in the container shows:

none on / type overlayfs (rw,relatime,lowerdir=/var/lib/lxc/buildhost2-ubu10,upperdir=/tmp/lxc-lp-v92y7NU)
none on /mnt/home/builder type overlayfs (rw,relatime,lowerdir=/mnt/home/builder,upperdir=/var/lib/lxc/buildhost2-ubu10-temp-loNNGB5/ephemeralbind/mnt/home/builder)

mount outside the container shows:
obnas1a:/vol/homes/builder 419430400 362328576 57101824 87% /mnt/home/builder
But sometimes, mount outside the container shows nothing for /mnt/home/builder after the problem happens.

This seems 100% repeatable.
---
AlsaDevices:
 total 0
 crw-rw---T 1 root audio 116, 1 Sep 14 15:17 seq
 crw-rw---T 1 root audio 116, 33 Sep 14 15:17 timer
AplayDevices: aplay: device_list:252: no soundcards found...
ApportVersion: 2.0.1-0ubuntu13
Architecture: amd64
ArecordDevices: arecord: device_list:252: no soundcards found...
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: [Errno 2] No such file or directory
CurrentDmesg:
 Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: Permission denied
 dmesg: write failed: Broken pipe
DistroRelease: Ubuntu 12.04
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120402)
Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
MachineType: VMware, Inc. VMware Virtual Platform
NonfreeKernelModules: vmci
Package: linux (not installed)
PciMultimedia:

ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 svgadrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-30-generic root=UUID=51e9e90f-c222-4072-892d-871faa221c9b ro quiet splash
ProcVersionSignature: Ubuntu 3.2.0-30.48-generic 3.2.27
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RfKill:

Tags: precise
Uname: Linux 3.2.0-30-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

WifiSyslog:

dmi.bios.date: 01/07/2011
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 6.00
dmi.board.name: 440BX Desktop Reference Platform
dmi.board.vendor: Intel Corporation
dmi.board.version: None
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 1
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd01/07/2011:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A:
dmi.product.name: VMware Virtual Platform
dmi.product.version: None
dmi.sys.vendor: VMware, Inc.

Revision history for this message
Dan Kegel (dank) wrote :

Using -U aufs yields another strange result:
inside the container, "ls /mnt/home/builder" seems to show the contents of the host's root directory.

System info:
$ dpkg-query -W lxc
lxc 0.7.5-3ubuntu62
$ cat /etc/issue
Ubuntu 12.04.1 LTS \n \l
Original install media may have been precise-beta.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1051080/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Dan Kegel (dank)
affects: ubuntu → lxc (Ubuntu)
Changed in lxc (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

lxc isn't needed to reproduce this. You can simply mount an overlayfs with lowerdir set to an nfs mounted directory, then ls in the overlay mount, and get an oops.

That was in precise. I will try on a quantal host and, assuming it reproduces, apport-collect from there.

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1051080

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

This actually appears to be fixed in quantal. marking as affecting precise.

Changed in linux (Ubuntu Precise):
status: New → Incomplete
Changed in linux (Ubuntu Quantal):
status: Incomplete → Fix Released
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :
  • d2 Edit (4.4 KiB, text/plain)

i couldn't run apport-collect since I didn't file the bug. Here is the dmesg output after reproducing this failure in precise. Here were the precise steps:

0. create user ubuntu2 on both 10.42.43.1 and 10.42.43.16. .16 will be the client
1. sudo mount -t nfs 10.42.43.1:/home/ubuntu2 /home/ubuntu2 # mounted rw,no_root_squash,no_subtree_check
2. mkdir /tmp/a
3. sudo mount -t overlayfs -oupperdir=/tmp/a,lowerdir=/home/ubuntu2 none /mnt
4. ls /mnt

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

@Dan,

would you mind doing apport-collect 1051080 as requested above?

I do notice that even on quantal, where the kernel bug does not appear to exist, lxc-start-ephemeral still fails with nfs-backed directories. If you run into that, please submit a new bug against lxc for that rather than re-using this one.

I will mark this particular bug as invalid against lxc, as this is a kernel bug.

Thanks!

Changed in lxc (Ubuntu Precise):
status: New → Invalid
Changed in lxc (Ubuntu Quantal):
status: New → Invalid
Revision history for this message
Dan Kegel (dank) wrote : AcpiTables.txt

apport information

tags: added: apport-collected precise
description: updated
Revision history for this message
Dan Kegel (dank) wrote : IwConfig.txt

apport information

Revision history for this message
Dan Kegel (dank) wrote : Lspci.txt

apport information

Revision history for this message
Dan Kegel (dank) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Dan Kegel (dank) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Dan Kegel (dank) wrote : ProcModules.txt

apport information

Revision history for this message
Dan Kegel (dank) wrote : UdevDb.txt

apport information

Revision history for this message
Dan Kegel (dank) wrote : UdevLog.txt

apport information

Changed in linux (Ubuntu Precise):
status: Incomplete → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(Actually lxc-start-ephemeral with nfs-mounted homedir is completely working for me in q)

Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in linux (Ubuntu Precise):
status: Confirmed → Won't Fix
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.