[libvirt-users] Question about setns recognising in libvirt autoconf

Hi experts, When I test lxc container with lxc-enter-namespace command, It reported an error as following: root@debian:~/github/libvirt# vir lxc-enter-namespace lxc --noseclabel /bin/df -hl error: Cannot get namespaces for 3145: Function not implemented It seems that setns is not supported by my kernel. But from the following info, It seemed the reason is just libvirt/autoconf doesn't recgonise setns. root@debian:~/github/libvirt# grep setns /proc/kallsyms ffffffff8105b78b T SyS_setns ffffffff8105b78b T sys_setns root@debian:~/github/libvirt# ./configure | grep setns checking for setns... no What the problem really is ? How can I fix this problem? Thanks~ ------------------ Best regards! GuanQiang 2013-12-09

On 12/09/2013 01:06 PM, hzguanqiang@corp.netease.com wrote:
Hi experts,
When I test lxc container with lxc-enter-namespace command, It reported an error as following: root@debian:~/github/libvirt# vir lxc-enter-namespace lxc --noseclabel /bin/df -hl error: Cannot get namespaces for 3145: Function not implemented
It seems that setns is not supported by my kernel.
But from the following info, It seemed the reason is just libvirt/autoconf doesn't recgonise setns. root@debian:~/github/libvirt# grep setns /proc/kallsyms ffffffff8105b78b T SyS_setns ffffffff8105b78b T sys_setns root@debian:~/github/libvirt# ./configure | grep setns checking for setns... no
What the problem really is ? How can I fix this problem?
What's the result of grep -R "setns" /usr/include/*

On 2013-12-09 13:18 , Gao feng wrote: On 12/09/2013 01:06 PM, hzguanqiang@corp.netease.com wrote:
Hi experts,
When I test lxc container with lxc-enter-namespace command, It reported an error as following: root@debian:~/github/libvirt# vir lxc-enter-namespace lxc --noseclabel /bin/df -hl error: Cannot get namespaces for 3145: Function not implemented
It seems that setns is not supported by my kernel.
But from the following info, It seemed the reason is just libvirt/autoconf doesn't recgonise setns. root@debian:~/github/libvirt# grep setns /proc/kallsyms ffffffff8105b78b T SyS_setns ffffffff8105b78b T sys_setns root@debian:~/github/libvirt# ./configure | grep setns checking for setns... no
What the problem really is ? How can I fix this problem?
What's the result of grep -R "setns" /usr/include/* Hi Gaofeng, The result you want is as following: root@debian:~/github/libvirt# grep -R "setns" /usr/include/* /usr/include/asm-generic/unistd.h:#define __NR_setns 268 /usr/include/asm-generic/unistd.h:__SYSCALL(__NR_setns, sys_setns) /usr/include/x86_64-linux-gnu/bits/syscall.h:#define SYS_setns __NR_setns /usr/include/x86_64-linux-gnu/asm/unistd_64.h:#define __NR_setns 308 /usr/include/x86_64-linux-gnu/asm/unistd_64.h:__SYSCALL(__NR_setns, sys_setns) /usr/include/x86_64-linux-gnu/asm/unistd_32.h:#define __NR_setns 346 ------------------ Best regards! GuanQiang 13:21:12

Hi Gaofeng, It seems that I've got the answer. In manual page about setns, it said that library support was added to glibc in version 2.14 while my libc version is 2.13. Thanks for help anyway. On 2013-12-09 13:22 , hzguanqiang@corp.netease.com wrote: On 2013-12-09 13:18 , Gao feng wrote: On 12/09/2013 01:06 PM, hzguanqiang@corp.netease.com wrote:
Hi experts,
When I test lxc container with lxc-enter-namespace command, It reported an error as following: root@debian:~/github/libvirt# vir lxc-enter-namespace lxc --noseclabel /bin/df -hl error: Cannot get namespaces for 3145: Function not implemented
It seems that setns is not supported by my kernel.
But from the following info, It seemed the reason is just libvirt/autoconf doesn't recgonise setns. root@debian:~/github/libvirt# grep setns /proc/kallsyms ffffffff8105b78b T SyS_setns ffffffff8105b78b T sys_setns root@debian:~/github/libvirt# ./configure | grep setns checking for setns... no
What the problem really is ? How can I fix this problem?
What's the result of grep -R "setns" /usr/include/* Hi Gaofeng, The result you want is as following: root@debian:~/github/libvirt# grep -R "setns" /usr/include/* /usr/include/asm-generic/unistd.h:#define __NR_setns 268 /usr/include/asm-generic/unistd.h:__SYSCALL(__NR_setns, sys_setns) /usr/include/x86_64-linux-gnu/bits/syscall.h:#define SYS_setns __NR_setns /usr/include/x86_64-linux-gnu/asm/unistd_64.h:#define __NR_setns 308 /usr/include/x86_64-linux-gnu/asm/unistd_64.h:__SYSCALL(__NR_setns, sys_setns) /usr/include/x86_64-linux-gnu/asm/unistd_32.h:#define __NR_setns 346 ------------------ Best regards! GuanQiang 13:21:12 ------------------ Best regards! GuanQiang 14:25:56

On 12/09/2013 02:29 PM, hzguanqiang@corp.netease.com wrote:
Hi Gaofeng, It seems that I've got the answer. In manual page about setns, it said that library support was added to glibc in version 2.14 while my libc version is 2.13.
Good news :)
Thanks for help anyway.
On 2013-12-09 13:22 , hzguanqiang@corp.netease.com <mailto:hzguanqiang@corp.netease.com> wrote:
On 2013-12-09 13:18 , Gao feng <mailto:gaofeng@cn.fujitsu.com> wrote:
On 12/09/2013 01:06 PM, hzguanqiang@corp.netease.com wrote: > Hi experts, > > When I test lxc container with lxc-enter-namespace command, It reported an error as > following: > root@debian:~/github/libvirt# vir lxc-enter-namespace lxc --noseclabel /bin/df -hl > error: Cannot get namespaces for 3145: Function not implemented > > It seems that setns is not supported by my kernel. > > But from the following info, It seemed the reason is just libvirt/autoconf doesn't > recgonise setns. > root@debian:~/github/libvirt# grep setns /proc/kallsyms > ffffffff8105b78b T SyS_setns > ffffffff8105b78b T sys_setns > root@debian:~/github/libvirt# ./configure | grep setns > checking for setns... no > > What the problem really is ? How can I fix this problem?
What's the result of grep -R "setns" /usr/include/*
Hi Gaofeng, The result you want is as following:
root@debian:~/github/libvirt# grep -R "setns" /usr/include/* /usr/include/asm-generic/unistd.h:#define __NR_setns 268 /usr/include/asm-generic/unistd.h:__SYSCALL(__NR_setns, sys_setns) /usr/include/x86_64-linux-gnu/bits/syscall.h:#define SYS_setns __NR_setns /usr/include/x86_64-linux-gnu/asm/unistd_64.h:#define __NR_setns 308 /usr/include/x86_64-linux-gnu/asm/unistd_64.h:__SYSCALL(__NR_setns, sys_setns) /usr/include/x86_64-linux-gnu/asm/unistd_32.h:#define __NR_setns 346
------------------ Best regards! GuanQiang 13:21:12
------------------ Best regards! GuanQiang 14:25:56
participants (2)
-
Gao feng
-
hzguanqiang@corp.netease.com