New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stop/start/restart of detached container #31996

Merged
merged 2 commits into from Mar 22, 2017

Conversation

Projects
None yet
5 participants
@aboch
Copy link
Contributor

aboch commented Mar 22, 2017

This PR fixes the issue where

  • Stopping a container which is not connected to any network does not remove its network namespace
  • Attempting to start or restart a container which is not connected to any network will fail with
Error response from daemon: Cannot restart container 9f0b96: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:334: running prestart hook 0 caused \"error running hook: exit status 1, stdout: , stderr: time=\\\"2017-03-21T17:46:07Z\\\" level=fatal msg=\\\"no sandbox present for 9f0b96b0acc44208160e73504fc4a504c21842e9384f510382057ef759fae364\\\" \\n\""

Fixes #31597

- A picture of a cute animal (not mandatory but encouraged)
canebrutto

Fix nw sandbox leak when stopping detached container
Signed-off-by: Ryan Liu <ryanlyy@me.com>
Fix start/restart of detached container
Signed-off-by: Alessandro Boch <aboch@docker.com>

@aboch aboch force-pushed the aboch:drst branch from fa0e6cd to 4ca7d4f Mar 22, 2017

@mavenugo
Copy link
Contributor

mavenugo left a comment

LGTM

@cpuguy83
Copy link
Contributor

cpuguy83 left a comment

LGTM

@cpuguy83 cpuguy83 merged commit d8406fd into moby:master Mar 22, 2017

6 checks passed

dco-signed All commits are signed
experimental Jenkins build Docker-PRs-experimental 31932 has succeeded
Details
janky Jenkins build Docker-PRs 40549 has succeeded
Details
powerpc Jenkins build Docker-PRs-powerpc 657 has succeeded
Details
windowsRS1 Jenkins build Docker-PRs-WoW-RS1 11631 has succeeded
Details
z Jenkins build Docker-PRs-s390x 537 has succeeded
Details

@GordonTheTurtle GordonTheTurtle added this to the 17.05.0 milestone Mar 22, 2017

liusdu pushed a commit to liusdu/moby that referenced this pull request Oct 30, 2017

Fix start/restart of detached container
cherry-pick from : moby#31996
fix: DTS2017063008068

Signed-off-by: Alessandro Boch <aboch@docker.com>
Signed-off-by: Lei Jitang <leijitang@huawei.com>

liusdu pushed a commit to liusdu/moby that referenced this pull request Oct 30, 2017

Fix nw sandbox leak when stopping detached container
cherry-pick from moby#31996

Signed-off-by: Ryan Liu <ryanlyy@me.com>
(cherry picked from commit 786f301)
Signed-off-by: Lei Jitang <leijitang@huawei.com>

@aboch aboch deleted the aboch:drst branch Nov 8, 2017

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