Skip to content

Vendor runc w/shared namespace support - #20956

Closed
estesp wants to merge 2 commits into
moby:masterfrom
estesp:vendor-runc-shared-namespaces
Closed

estesp wants to merge 2 commits into
moby:masterfrom
estesp:vendor-runc-shared-namespaces

Conversation

@estesp

@estesp estesp commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

Update to latest opencontainers/runc with re-written support in C for namespace join/setup. This will enable namespace sharing including across user namespaces as well as shared PID namespace support.

@calavera

calavera commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

There is something very broken with this update:

20:44:07 ----------------------------------------------------------------------
20:44:07 FAIL: docker_cli_run_test.go:2334: DockerSuite.TestRunUnknownCommand
20:44:07 
20:44:07 docker_cli_run_test.go:2349:
20:44:07     c.Assert(err, check.NotNil)
20:44:07 ... value = nil
20:44:07 
20:44:08 
20:44:08 ----------------------------------------------------------------------

@calavera

calavera commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

I also wonder if we should better wait for #20662 to work in more driver features.

@calavera

calavera commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

PS: We really really really want Containerd in 1.11. More than PID namespaces 😉

@icecrime icecrime added the status/failing-ci Indicates that the PR in its current state fails the test suite label Mar 5, 2016
@estesp

estesp commented Mar 5, 2016

Copy link
Copy Markdown
Contributor Author

@calavera yeah--down to the last one of those bugs; runc/libcontainer modified how exit/errors worked so it took a bit of work to match it up with the changes to runC.

I don't think these changes preclude any kind of progress on containerd integration, and I agree that is high priority for 1.11. Only about 30 lines of changes in the execdriver to sync up with the updated libcontainer, and of course once we get rid of the execdriver this all gets easier. The reason I think vendoring is important at the moment is that it lets us get rid of restrictions on user namespaces that exist today and keep Docker from being used with k8s with user namespaces enabled; and those changes are necessary whether there is an execdriver or not.

@estesp
estesp force-pushed the vendor-runc-shared-namespaces branch from b68632a to 93da6d4 Compare March 5, 2016 13:31
@estesp

estesp commented Mar 5, 2016

Copy link
Copy Markdown
Contributor Author

Hmm, so that test was actually depending on unspecified/undocumented behavior that was actually inconsistent (as you can see in the current version the long comment about Windows) with the rest of the engine.

docker create + docker start == docker run -d : docker run with detached does not "error out" on invalid/inaccessible command. The exit code for the container is correct (as seen from inspect) and logs reveal the error text properly

docker create + docker start -a == docker run : run (attached by default) or start with -a show the error and exit with the exit code because you are attached.

This test was not starting attached, so should have had the behavior of docker run -d, but in the prior versions of libcontainer somehow didn't. I have modified the test to validate this behavior, which seems proper.

Anyone relying on docker start showing an error for command not found/permission denied is relying on behavior that isn't documented or explained anywhere. docker start -a provides that if necessary.

@estesp estesp removed the status/failing-ci Indicates that the PR in its current state fails the test suite label Mar 7, 2016
@thaJeztah

Copy link
Copy Markdown
Member

ping @calavera @tonistiigi PTAL, also; I see there's concerns over merging this before containerd integration is completed?

estesp added 2 commits March 8, 2016 17:05
Docker-DCO-1.1-Signed-off-by: Phil Estes <[email protected]> (github: estesp)
Changes to match updates/changes in libcontainer

Docker-DCO-1.1-Signed-off-by: Phil Estes <[email protected]> (github: estesp)
@estesp
estesp force-pushed the vendor-runc-shared-namespaces branch from 93da6d4 to 246c564 Compare March 8, 2016 22:09
@calavera

Copy link
Copy Markdown
Contributor

I think we should close this and focus on containerd.

@estesp estesp mentioned this pull request Mar 15, 2016
11 tasks done
@estesp

estesp commented Mar 15, 2016

Copy link
Copy Markdown
Contributor Author

crazy timing @calavera! was just commenting in #20662 at the same time. I agree we can work this into the containerd/post-containerd integration. Although to be clear this PR added no function/made no changes other than vendoring (e.g. it was only step 1 for potential new capabilities around sharing namespaces)

@estesp estesp closed this Mar 15, 2016
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.

5 participants