As an additional datapoint, lxc-attach (from lxc-0.7.2) had worked for me with linux-2.6.35 with the corresponding setns patches (attached). <div><br></div><div>Now I need to upgrade the kernel (ideally, to 2.6.38 or 3.0) and I've been unable to get lxc-attach to work with the newer kernel. Is there any other information that I can provide to help get this issue resolved?</div>
<div><br></div><div>Thanks,</div><div>Nikhil</div><div>
<br><br><div class="gmail_quote">On Thu, Sep 8, 2011 at 9:48 AM, Nikhil Handigol <span dir="ltr"><<a href="mailto:nikhil.handigol@gmail.com">nikhil.handigol@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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:<div><br><div>$ cd src/lxc</div><div>$ ./lxc-execute -n foo -f /etc/mn/host.conf -- /bin/bash </div>

<div>root@mnhost:/home/nikhilh/lxc/src/lxc# </div><div><br></div><div>In another terminal:</div><div>$ cd src/lxc</div><div>$ ./lxc-attach -n foo -- /bin/bash </div><div class="im"><div>lxc-attach: Function not implemented - failed to set namespace 'pid'</div>

<div>lxc-attach: failed to enter the namespace</div></div><div><font color="#888888"> <br clear="all">-- Nikhil</font><div><div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Thu, Sep 8, 2011 at 9:40 AM, Daniel Lezcano <span dir="ltr"><<a href="mailto:daniel.lezcano@free.fr" target="_blank">daniel.lezcano@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On 09/08/2011 06:30 PM, Nikhil Handigol wrote:<br>
> I just tried running lxc-attach with linux-2.6.38. I got the same error as<br>
> with linux-3.0 -- Function not implemented - failed to set namespace 'pid'.<br>
><br>
> Here's the exact sequence of steps that I followed:<br>
><br>
> Compiled linux-2.6.38.2 with the corresponding setns patches (<br>
> <a href="http://lxc.sourceforge.net/patches/linux/2.6.38/2.6.38.2-lxc1/" target="_blank">http://lxc.sourceforge.net/patches/linux/2.6.38/2.6.38.2-lxc1/</a>).<br>
><br>
> Rebooted into 2.6.38.2<br>
> $ uname -a<br>
> Linux nf-build2 2.6.38.2-lxc-0.7.4-with-setns #1 SMP Thu Sep 8 08:42:40 PDT<br>
> 2011 x86_64 GNU/Linux<br>
><br>
> Compiled lxc-0.7.4:<br>
> $ git checkout lxc-0.7.4<br>
> $ ./configure; make; sudo make install<br>
<br>
</div>Is it possible you have another lxc version installed on your system ?<br>
For instance, /usr/bin and the one you are compiling is installed in<br>
/usr/local/bin.<br>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>