Skip to content
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

Containers don't restart with docker service (2.1) #4463

Closed
2 tasks done
ktmitton opened this issue Aug 7, 2019 · 6 comments · Fixed by moby/moby#39703
Closed
2 tasks done

Containers don't restart with docker service (2.1) #4463

ktmitton opened this issue Aug 7, 2019 · 6 comments · Fixed by moby/moby#39703

Comments

@ktmitton
Copy link

ktmitton commented Aug 7, 2019

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: 12CD9B90-4858-4838-9983-BD5D447BBC56/20190807123239

Expected behavior

When the docker service is restarted, containers with an always restart policy are restarted.

Actual behavior

When the docker service is restarted, container with an always restart policy are in an Exited status.

Information

  • Windows Version: Windows 10 Pro 1903 Build 18362.175
  • Docker Desktop Version: 2.1.0.0 (36874)
  • Experimental Features:
    • On - Windows and Linux containers affected
    • Off - Windows containers affected, Linux containers behave as expected

This looks to be an issue restricted to the Windows daemon based on observations with Experimental Features.

Going through the logs, this stuck out at me:

[07:07:52.895][WindowsDaemon     ][Info   ] debug: Sending kill signal 15 to container 6baa8ec6084e8f9379bece4c0e8356012a7cfbb0f606cac32350e1ae27dc5b11
[07:07:52.895][WindowsDaemon     ][Info   ] debug: Signal() [process=init pid=306 signal=15 module=libcontainerd namespace=moby container=6baa8ec6084e8f9379bece4c0e8356012a7cfbb0f606cac32350e1ae27dc5b11]
[07:07:52.895][WindowsDaemon     ][Info   ] debug: hcsshim::ComputeSystem::Shutdown - Begin Operation [cid=6baa8ec6084e8f9379bece4c0e8356012a7cfbb0f606cac32350e1ae27dc5b11]
[07:07:52.908][WindowsDaemon     ][Info   ] debug: hcsshim::ComputeSystem::Shutdown - End Operation - Success [cid=6baa8ec6084e8f9379bece4c0e8356012a7cfbb0f606cac32350e1ae27dc5b11]
[07:08:22.908][WindowsDaemon     ][Info   ] Container 6baa8ec6084e8f9379bece4c0e8356012a7cfbb0f606cac32350e1ae27dc5b11 failed to exit within 30 seconds of signal 15 - using the force
[07:08:22.908][WindowsDaemon     ][Info   ] debug: Sending kill signal 9 to container 6baa8ec6084e8f9379bece4c0e8356012a7cfbb0f606cac32350e1ae27dc5b11

I'm also suspicious that this is related to #4399 and #4056, but I don't seem to get logs on system shutdown.

Steps to reproduce the behavior

Experimental Features On - Windows and Linux containers

  1. run docker run -d --restart always alpine watch ps -ef to start a linux container
  2. run docker run -d --restart always mcr.microsoft.com/windows/nanoserver:1903 ping -t localhost to start a windows container
  3. If you run docker ps, you'll see the containers are up and running
  4. restart docker
  5. If you run docker ps -a, you'll see the containers are not running, but are in an exited state

Experimental Features Off - Windows Containers

  1. run docker run -d --restart always mcr.microsoft.com/windows/nanoserver:1903 ping -t localhost to start a windows container
  2. If you run docker ps, you'll see the containers are up and running
  3. restart docker
  4. If you run docker ps -a, you'll see the container is not running, but is in an exited state

Experimental Features Off - Linux Containers

  1. run docker run -d --restart always alpine watch ps -ef to start a linux container
  2. If you run docker ps, you'll see the containers are up and running
  3. restart docker
  4. If you run docker ps -a, you'll see the container is still running
@StefanScherer
Copy link
Member

Thanks for reporting. Windows container not restarting is tracked in moby/moby#39623

@ktmitton
Copy link
Author

ktmitton commented Aug 7, 2019

Sounds good, thanks for the heads up!

@thaJeztah
Copy link
Member

Fix is in the works; moby/moby#39703

@ktmitton
Copy link
Author

ktmitton commented Aug 9, 2019

Awesome, thanks!

Is there anything I can do to help with testing?

@thaJeztah
Copy link
Member

Docker Engine ("daemon") builds from master will be available on https://master.dockerproject.org (I don't think the current build already has the fix); the fix will be included in the upcoming Docker Engine 19.03.2 patch release (and included in the corresponding Docker Desktop patch release).

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jul 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants