Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-08 Thread Nikhil Handigol
Thanks Daniel! The linux-3.0 patches don't seem to be working for me unfortunately. I compiled lxc-0.7.5 with the patched linux-3.0. After starting a container foo via lxc-execute,I ran the following command: $ lxc-attach -n foo -- /bin/bash When I run lxc-attach, I get the following error:

Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-08 Thread Nikhil Handigol
I just tried running lxc-attach with linux-2.6.38. I got the same error as with linux-3.0 -- Function not implemented - failed to set namespace 'pid'. Here's the exact sequence of steps that I followed: Compiled linux-2.6.38.2 with the corresponding setns patches (

Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-08 Thread Daniel Lezcano
On 09/08/2011 06:30 PM, Nikhil Handigol wrote: I just tried running lxc-attach with linux-2.6.38. I got the same error as with linux-3.0 -- Function not implemented - failed to set namespace 'pid'. Here's the exact sequence of steps that I followed: Compiled linux-2.6.38.2 with the

Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-08 Thread Nikhil Handigol
Just to be sure that wasn't the case, I tried running the executable directly from the lxc source directory. I got the same error: $ cd src/lxc $ ./lxc-execute -n foo -f /etc/mn/host.conf -- /bin/bash root@mnhost:/home/nikhilh/lxc/src/lxc# In another terminal: $ cd src/lxc $ ./lxc-attach -n foo

Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-08 Thread Nikhil Handigol
If I understand the lxc code right, it's failing in the function get_cgroup_mount in src/lxc/cgroup.c, which tries to read the cgroup mount point from /proc/mounts. /proc/mount seems to be fine on my machine: $ cat /proc/mounts ... ... cgroup /cgroup cgroup

Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-07 Thread Greg Kurz
On Wed, 2011-09-07 at 10:38 +0200, Daniel Lezcano wrote: On 09/07/2011 02:17 AM, Nikhil Handigol wrote: Hi, I have been facing problems getting lxc (more specifically, lxc-attach) to work on Linux v3.1.0-rc4. When I run lxc-attach, I get the following error: $ lxc-attach -n foo --

Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-07 Thread Daniel Lezcano
On 09/07/2011 11:33 AM, Greg Kurz wrote: On Wed, 2011-09-07 at 10:38 +0200, Daniel Lezcano wrote: On 09/07/2011 02:17 AM, Nikhil Handigol wrote: Hi, I have been facing problems getting lxc (more specifically, lxc-attach) to work on Linux v3.1.0-rc4. When I run lxc-attach, I get the following

Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-07 Thread Matteo Bernardini
http://lxc.sourceforge.net/patches/linux/3.0.0/3.0.0-lxc1/ I've done a quick try of the patches with linux-3.0.4 with lxc-0.7.5, slackware64-13.37 and my existing containers and I'm able to turn them off easily with lxc-attach -n mycontainer -- /sbin/halt \o/ I'll test them more, but in the

Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-07 Thread Goran Cetusic
Thank you, Daniel. If lxc-attach enters the mainline kernels it will, with the LANA netgraph implementation, become a powerful tool for network simulation. The only component inside the kernel that is still missing are union mounts. On Wed, Sep 7, 2011 at 3:55 PM, Matteo Bernardini

[Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-06 Thread Nikhil Handigol
Hi, I have been facing problems getting lxc (more specifically, lxc-attach) to work on Linux v3.1.0-rc4. When I run lxc-attach, I get the following error: $ lxc-attach -n foo -- /bin/bash lxc-attach: No such file or directory - failed to open '/proc/821/ns/pid' lxc-attach: failed to enter the