Skip to content

Add --pid to enable host pid namespace.#273

Merged
AkihiroSuda merged 1 commit intocontainerd:masterfrom
shishir-a412ed:pid_namespace
Jun 29, 2021
Merged

Add --pid to enable host pid namespace.#273
AkihiroSuda merged 1 commit intocontainerd:masterfrom
shishir-a412ed:pid_namespace

Conversation

@shishir-a412ed
Copy link
Copy Markdown
Contributor

@shishir-a412ed shishir-a412ed commented Jun 29, 2021

Tested the patch by launching a container with --pid=host, Both /proc/<container_host_pid>/ns and /proc/$$/ns has the same PID namespace iNode (which is the host PID namespace).

root@vagrant:~/go/src/github.com/containerd/nerdctl# ls /proc/27517/ns -lt
total 0
lrwxrwxrwx 1 root root 0 Jun 29 01:32 cgroup -> 'cgroup:[4026531835]'
....
lrwxrwxrwx 1 root root 0 Jun 29 01:32 pid -> 'pid:[4026531836]'
lrwxrwxrwx 1 root root 0 Jun 29 01:32 pid_for_children -> 'pid:[4026531836]'

root@vagrant:~/go/src/github.com/containerd/nerdctl# ls /proc/$$/ns -lt
total 0
lrwxrwxrwx 1 root root 0 Jun 29 01:32 cgroup -> 'cgroup:[4026531835]'
.....
lrwxrwxrwx 1 root root 0 Jun 29 01:32 pid -> 'pid:[4026531836]'
lrwxrwxrwx 1 root root 0 Jun 29 01:32 pid_for_children -> 'pid:[4026531836]'

Signed-off-by: Shishir Mahajan [email protected]

@shishir-a412ed
Copy link
Copy Markdown
Contributor Author

shishir-a412ed commented Jun 29, 2021

ping @AkihiroSuda @fahedouch

@AkihiroSuda AkihiroSuda added this to the v0.10.0 milestone Jun 29, 2021
Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit ad836c2 into containerd:master Jun 29, 2021
@fahedouch fahedouch mentioned this pull request Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants