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

Nikhil Handigol nikhil.handigol at gmail.com
Thu Sep 8 16:30:24 UTC 2011


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 (
http://lxc.sourceforge.net/patches/linux/2.6.38/2.6.38.2-lxc1/).

Rebooted into 2.6.38.2
$ uname -a
Linux nf-build2 2.6.38.2-lxc-0.7.4-with-setns #1 SMP Thu Sep 8 08:42:40 PDT
2011 x86_64 GNU/Linux

Compiled lxc-0.7.4:
$ git checkout lxc-0.7.4
$ ./configure; make; sudo make install

Created a container:
# lxc-execute -n foo -f /etc/mn/host.conf -- /bin/bash
root at mnhost:~#

In a separate terminal, tried running lxc-attach:
# lxc-attach -n foo -- /bin/bash
lxc-attach: Function not implemented - failed to set namespace 'pid'
lxc-attach: failed to enter the namespace

Even in linux-2.6.38.2, lxc-attach is failing at the point where it calls
setns. Am I doing something wrong here?

By the way, I'm using Ubuntu 8.04, if that makes any difference.

Thanks,
Nikhil


On Thu, Sep 8, 2011 at 8:23 AM, Nikhil Handigol
<nikhil.handigol at gmail.com>wrote:

> 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:
> lxc-attach: Function not implemented - failed to set namespace 'pid'
>
> lxc-attach: failed to enter the namespace
>
> Upon more probing into the errno, I found:
> errno = 38
> strerror says: Function not implemented
>
>
> The required ns files do seem to be present in /proc/<pid>/ns:
> $ ls /proc/28559/ns/
> ipc mnt net pid user uts
>
> I also double-checked that all the setns patches were properly applied to
> the kernel:
> $ quilt top
> 0016-ns-proc-Enable-setns-for-support-for-the-pid-namespa.patch
>
> I'd appreciate any help in fixing this error.
>
> Thanks,
> Nikhil
>
>
> On Wed, Sep 7, 2011 at 6:55 AM, Matteo Bernardini <
> matteo.bernardini at gmail.com> wrote:
>
>> > 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 meantime thanks Daniel!
>>
>> Matteo
>>
>>
>> ------------------------------------------------------------------------------
>> Using storage to extend the benefits of virtualization and iSCSI
>> Virtualization increases hardware utilization and delivers a new level of
>> agility. Learn what those decisions are and how to modernize your storage
>> and backup environments for virtualization.
>> http://www.accelacomm.com/jaw/sfnl/114/51434361/
>> _______________________________________________
>> Lxc-users mailing list
>> Lxc-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/lxc-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110908/8ea1ff9e/attachment.html>


More information about the lxc-users mailing list