Bug 694931

Summary: lxc-execute fails due to namespace mismatch (?)
Product: [Fedora] Fedora Reporter: Horst H. von Brand <vonbrand>
Component: lxcAssignee: Thomas Moschny <thomas.moschny>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 15CC: dick, dwalsh, gbauman, mschmidt, the.loeki, thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lxc-0.7.5-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-13 21:32:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Horst H. von Brand 2011-04-08 23:07:03 UTC
Description of problem:
Running lxc-execute as the manual specifies gives:
# lxc-create -n foo
# lxc-execute -n foo /bin/bash
lxc-execute: No such file or directory - failed to rename cgroup /sys/fs/cgroup/systemd/22380->/sys/fs/cgroup/systemd/foo
lxc-execute: failed to spawn 'foo'
lxc-execute: No such file or directory - failed to remove cgroup '/sys/fs/cgroup/systemd/foo'
#lxc-ls
foo


Version-Release number of selected component (if applicable):
lxc-0.7.2-2.fc15.x86_64

How reproducible:
Always...

Steps to Reproduce:
1. lxc-execute -n foo /bin/bash
2.
3.
  
Actual results:
Above error messages

Expected results:


Additional info:
BTW, the example (/usr/share/doc/lxc/examples/lxc-macvlan.conf) refers to network interface eth0, which today is called em1.

Comment 1 Daniel Walsh 2011-06-15 19:20:11 UTC
Ok I grabbed the lxc-0.7.4.1-1 srpm off of Rawhide and recompiled into F15 and now this error is gone. but I got a new one.

# lxc-execute -n foo /bin/bash
lxc-init: failed to mount /dev/mqueue : Too many levels of symbolic links

Comment 2 Silas Sewell 2011-06-26 01:19:50 UTC
I have orphaned this package.

Comment 3 Fedora Admin XMLRPC Client 2011-07-06 21:44:42 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Thomas Moschny 2011-07-07 00:21:29 UTC
(In reply to comment #1)
> Ok I grabbed the lxc-0.7.4.1-1 srpm off of Rawhide and recompiled into F15 and
> now this error is gone. but I got a new one.
> 
> # lxc-execute -n foo /bin/bash
> lxc-init: failed to mount /dev/mqueue : Too many levels of symbolic links

Confirmed with 0.7.4.2. This is due to /dev/mqueue being mounted type autofs by systemd. We will talk to lxc upstream about this.

Comment 5 Thomas Moschny 2011-07-07 00:56:49 UTC
Here's a workaround, until we find the 'correct' solution:

$ rm /lib/systemd/system/sysinit.target.wants/dev-mqueue.automount
$ ln -s ../dev-mqueue.mount /lib/systemd/system/sysinit.target.wants/dev-mqueue.mount

After a reboot, the simple lxc test works.

Comment 6 Michal Schmidt 2011-07-07 08:29:27 UTC
(In reply to comment #1)
> lxc-init: failed to mount /dev/mqueue : Too many levels of symbolic links

lxc should stop trying to mount the filesystems itself. Just assume they are already mounted.

The whole src/lxc/lxc_init.c:lxc_setup_fs() is harmful. It even tries to umount /proc and /dev/shm and then mount them back again. That's evil.

Comment 8 Thomas Moschny 2011-09-14 23:38:25 UTC
*** Bug 736534 has been marked as a duplicate of this bug. ***

Comment 9 Fedora Admin XMLRPC Client 2012-01-14 21:43:00 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Fedora Update System 2012-03-27 16:52:45 UTC
lxc-0.7.5-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/lxc-0.7.5-1.fc15

Comment 11 Fedora Update System 2012-03-31 03:27:18 UTC
Package lxc-0.7.5-1.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lxc-0.7.5-1.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-5108/lxc-0.7.5-1.fc15
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2012-04-13 21:32:23 UTC
lxc-0.7.5-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.