For questions regarding Linux kernel's namespaces mechanism.
Questions tagged [linux-namespaces]
143 questions
1
vote
0 answers
netlink_register_notifier is not available with Network namespace support?
I could not find functions "netlink_register_notifier" or "netlink_unregister_notifier" which were used to handle notification during events like "NETLINK_URELEASE" in current Unix Kernel supporting network namespace that uses…

Viswesn
- 4,674
- 2
- 28
- 45
1
vote
0 answers
lxc sharing network namespace between containers
I am trying to start a lxc container deb1 and use --share-net to start another container deb2 to share the network namespace. But both in fedora and Ubuntu i and getting error below:
issue |
[root@blr-vxr-056 ~]# lxc-start --share-net deb1 -n…

ik.nitk
- 11
- 2
1
vote
2 answers
Detaching terminal of a parent process
I'm experimenting with namespaces under Linux so I'm writing a small C program to isolate a Debian Wheezy environment created with debootstrap.
I could successfully start sysv-init and get a login prompt but when I close the isolated environment,…

Cristiano Paris
- 1,786
- 2
- 14
- 21
1
vote
0 answers
Linux Network namespaces unexpected behavior
So I've been playing around with Network namespaces recently.
I put together a simple code, built it and noticed something very weird happening.
The code is as follows:
package main
import (
"fmt"
"log"
"net"
"os"
"path"
…

milosgajdos
- 851
- 1
- 14
- 32
1
vote
0 answers
Is Linux Kernel fully Namespace-aware now?
I am reading the book Professional Linux Kernel Architecture which comes out in 2008.
In the page 49, talking about Process Management and Scheduling,
Namespaces are currently still marked as experimental in the standard
kernel, and development …

zongyuwu
- 325
- 1
- 3
- 8
0
votes
0 answers
How to get file descriptor of parent mount namespace?
In this page: https://man7.org/linux/man-pages/man2/ioctl_ns.2.html
Its mentioned how one can get the file descriptor that refers to the parent namespace of the namespace referred to by fd. Its mentioned that it only works for hierarchical…

Tarun Gupta
- 19
- 5
0
votes
1 answer
How to start apache2 in a mininet host, and access it from another host?
Using Mininet, I need to setup an emulated network to test web browsing performance, where one host of it running an apache2 server, and then access it from another host. I already have a configured website on the physical machine and have verified…

leeyee
- 163
- 1
- 8
0
votes
0 answers
setns setting the wrong namespace
I am trying to create five processes in the same pid namespace. I understand they should share the inode number of /proc//ns/pid link. However, the first child seems to have a different link from the other four.
Code:
/* tellns.c
*/
#define…

Hardik Rajpal
- 37
- 1
- 4
0
votes
0 answers
exec fails to find files after root changed using pivot_root
I'm trying to experiment with namespaces and chroot emulation, and have succeeded in creating an environment that only has the new root in it (confirmed by a directory traversal), but for some reason, I can't seem to execute anything in it.
Here is…

InterLinked
- 1,247
- 2
- 18
- 50
0
votes
0 answers
linux: setguid() in new user namespace
My initial task: start a bunch of processes in separate network namespace (with lo 127.0.0.1 interface only and no one listening any ports). So I use:
unshare -n -r bash -c -x myscript.sh
I need -r because of -n: you can't manage your "new network"…

pavelkolodin
- 2,859
- 3
- 31
- 74
0
votes
1 answer
How to make /etc writable inside user namespace for kubelet in userns
In the kubernetes documentation for running kubelet in user namespace, https://kubernetes.io/docs/tasks/administer-cluster/kubelet-in-userns/, one of the requirements is:
At least, the following directories need to be writable in the namespace (not…

Laurentiu Soica
- 149
- 2
- 15
0
votes
1 answer
`curl` from a Docker container's network namespace produces different results than `curl` from the container itself
I've set up a Docker container with the ubuntu image. I get different results when I curl from the Docker container than when I enter the container's network namespace and try the same command. What's taking place here?
# Set up the container
docker…

JellicleCat
- 28,480
- 24
- 109
- 162
0
votes
1 answer
why sysctl net.ipv4.tcp_timestamps works different in different kernel on container
I upgraded a machine's kernel from 3.10.0 to 4.20.13 and left else unchanged, but net.ipv4.tcp_timestamps acts different on docker after upgrading as showed in below picture.
I am guessing this parameter become namespaced in new kernel but I can't…

AnonymousX
- 638
- 7
- 8
0
votes
2 answers
How to discover the network namespace an (RT)NETLINK socket connects to?
While playing around with the code below I noticed that a network namespace can be kept alive without neither a process attached to it nor any "direct" reference by an open file descriptor to the nsfs inode.
How can I discover the network namespace…

TheDiveO
- 2,183
- 2
- 19
- 38
0
votes
1 answer
unshare user namespace, fork, map uid then execvp failing
I am trying to do the following sequence of actions:
unshare the user namespace;
Map the user in child process to root;
execvp.
However, when running id, my code outputs the user as a nobody or fails without error.
#include
#include…

rachid chami
- 33
- 8