Skip to content

Fix stop/start/restart of detached container#31996

Merged
cpuguy83 merged 2 commits intomoby:masterfrom
aboch:drst
Mar 22, 2017
Merged

Fix stop/start/restart of detached container#31996
cpuguy83 merged 2 commits intomoby:masterfrom
aboch:drst

Conversation

@aboch
Copy link
Copy Markdown
Contributor

@aboch 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

Signed-off-by: Ryan Liu <ryanlyy@me.com>
Signed-off-by: Alessandro Boch <aboch@docker.com>
Copy link
Copy Markdown
Contributor

@mavenugo mavenugo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@cpuguy83 cpuguy83 merged commit d8406fd into moby:master Mar 22, 2017
@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
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
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 drst branch November 8, 2017 19:52
kolyshkin pushed a commit to kolyshkin/moby that referenced this pull request May 4, 2020
Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
(cherry picked from commit a43be34)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Conflicts:
 - daemon/container_operations.go: missing
   moby#31996
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.

stop/rm container did not remove its network namespace after running docker network disconnect cmd to diconnect bridge network

5 participants