Skip to content

Add --pid flag for staying in the host's pid namespace#10080

Merged
crosbymichael merged 2 commits intomoby:masterfrom
crosbymichael:pid-ns
Jan 14, 2015
Merged

Add --pid flag for staying in the host's pid namespace#10080
crosbymichael merged 2 commits intomoby:masterfrom
crosbymichael:pid-ns

Conversation

@crosbymichael
Copy link
Copy Markdown
Contributor

Replaces #9339

This adds an integration test for the --pid host mode

rhatdan and others added 2 commits January 13, 2015 16:35
We want to be able to use container without the PID namespace.  We basically
want containers that can manage the host os, which I call Super Privileged
Containers.  We eventually would like to get to the point where the only
namespace we use is the MNT namespace to bring the Apps userspace with it.

By eliminating the PID namespace we can get better communication between the
host and the clients and potentially tools like strace and gdb become easier
to use.  We also see tools like libvirtd running within a container telling
systemd to place a VM in a particular cgroup, we need to have communications of the PID.

I don't see us needing to share PID namespaces between containers, since this
is really what docker exec does.

So currently I see us just needing docker run --pid=host

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
@crosbymichael crosbymichael changed the title Pid ns Add --pid flag for saying in the host's pid namespace Jan 14, 2015
@crosbymichael crosbymichael changed the title Add --pid flag for saying in the host's pid namespace Add --pid flag for staying in the host's pid namespace Jan 14, 2015
@jessfraz
Copy link
Copy Markdown
Contributor

kewl LGTM, I bet next will come --pid=container ;)

@crosbymichael
Copy link
Copy Markdown
Contributor Author

This has been LGTM'ed in the other PR, merging.

crosbymichael added a commit that referenced this pull request Jan 14, 2015
Add --pid flag for staying in the host's pid namespace
@crosbymichael crosbymichael merged commit 47e3da8 into moby:master Jan 14, 2015
@crosbymichael crosbymichael deleted the pid-ns branch January 14, 2015 01:00
@ibuildthecloud
Copy link
Copy Markdown
Contributor

I just shed of tear of joy when I noticed this PR was merged. I'll be a sobbing baby when --pid=container lands.

@thockin
Copy link
Copy Markdown
Contributor

thockin commented Jan 15, 2015

Is there a PR open for --pod=container ?
On Jan 15, 2015 9:39 AM, "Darren" notifications@github.com wrote:

I just shed of tear of joy when I noticed this PR was merged. I'll be a
sobbing baby when --pid=container lands.

Reply to this email directly or view it on GitHub
#10080 (comment).

@jessfraz
Copy link
Copy Markdown
Contributor

I was making a joke that it would be next, but no one has made it yet

On Thursday, January 15, 2015, Tim Hockin notifications@github.com wrote:

Is there a PR open for --pod=container ?
On Jan 15, 2015 9:39 AM, "Darren" <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I just shed of tear of joy when I noticed this PR was merged. I'll be a
sobbing baby when --pid=container lands.

Reply to this email directly or view it on GitHub
#10080 (comment).


Reply to this email directly or view it on GitHub
#10080 (comment).

@thockin
Copy link
Copy Markdown
Contributor

thockin commented Jan 16, 2015

Consider this a request?
On Jan 15, 2015 3:15 PM, "Jessie Frazelle" notifications@github.com wrote:

I was making a joke that it would be next, but no one has made it yet

On Thursday, January 15, 2015, Tim Hockin notifications@github.com
wrote:

Is there a PR open for --pod=container ?
On Jan 15, 2015 9:39 AM, "Darren" <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I just shed of tear of joy when I noticed this PR was merged. I'll be
a
sobbing baby when --pid=container lands.

Reply to this email directly or view it on GitHub
#10080 (comment).

Reply to this email directly or view it on GitHub
#10080 (comment).

Reply to this email directly or view it on GitHub
#10080 (comment).

@thaJeztah
Copy link
Copy Markdown
Member

@thockin @ibuildthecloud it looks like you both have use-cases to describe why it's useful. Could you please create a new issue describing this? It'd make it easier to track, and a decision to implement it (or not) can be made there.

(Sorry for meddling in this, @jfrazelle 😄 trying to keep my head sane following things)

@thaJeztah
Copy link
Copy Markdown
Member

People looking for --pid=container:id; @thockin opened a new issue for that here: #10163 (thanks!)

@wires
Copy link
Copy Markdown

wires commented Mar 13, 2016

I cannot seem to figure out how start a container with --pid=host using the API, Does this command line option an API analogue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants