-
Notifications
You must be signed in to change notification settings - Fork 303
Closed
moby/moby
#39703Description
- 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
- run
docker run -d --restart always alpine watch ps -efto start a linux container - run
docker run -d --restart always mcr.microsoft.com/windows/nanoserver:1903 ping -t localhostto start a windows container - If you run
docker ps, you'll see the containers are up and running - restart docker
- 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
- run
docker run -d --restart always mcr.microsoft.com/windows/nanoserver:1903 ping -t localhostto start a windows container - If you run
docker ps, you'll see the containers are up and running - restart docker
- 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
- run
docker run -d --restart always alpine watch ps -efto start a linux container - If you run
docker ps, you'll see the containers are up and running - restart docker
- If you run
docker ps -a, you'll see the container is still running
Reactions are currently unavailable