-
Notifications
You must be signed in to change notification settings - Fork 78
doesn't do clean shutdown at all. #14
Comments
See the log: Welcome to Ubuntu 16.04.4 LTS! Set hostname to <598c908ab533>. Welcome to Ubuntu 16.04.4 LTS! Set hostname to <598c908ab533>. Welcome to Ubuntu 16.04.4 LTS! Set hostname to <598c908ab533>. |
I shutdown and restart the container 2 twice, and it didn't log any graceful shutdown |
no one can speak to this?? |
I could not reproduce the problem. Here are the exact commands I ran: # Remove my pre-existing image to make sure I'm testing the latest image up
# on Docker Hub.
docker rmi solita/ubuntu-systemd
# Set up the Docker host.
docker run --rm --privileged -v /:/host solita/ubuntu-systemd setup
# Start a new container.
docker run -d --name systemd --security-opt seccomp=unconfined \
--tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
-t solita/ubuntu-systemd
# Check the logs.
docker logs systemd
# The logs show normal systemd startup and end with
#
# [ OK ] Reached target Multi-User System.
# Check that journald works.
docker exec systemd journalctl
# The last line in the journal is:
#
# Mar 31 06:35:02 59db11863abc systemd[1]: Startup finished in 46ms.
# In a second terminal, follow Docker logs. Hit enter a couple of times to
# see where new output begins.
docker logs -f systemd
# In a third terminal, follow the journal. Hit enter a couple of times to
# see where new output begins.
docker exec systemd journalctl -f
# In the first terminal, stop the container.
docker stop systemd
# The second terminal (Docker logs) shows systemd shutdown beginning with
#
# [ OK ] Stopped target Multi-User System.
#
# and ending with
#
# [ OK ] Reached target Shutdown.
#
# There are a couple of "Permission denied" errors as systemd tries to
# shut down parts of the Docker host it has no access to.
# The third terminal (the journal) shows systemd shutdown beginning with
#
# Mar 31 06:40:02 59db11863abc systemd[1]: Received SIGRTMIN+3.
# Mar 31 06:40:02 59db11863abc systemd[1]: Stopped target Multi-User System.
#
# and ending with
#
# Mar 31 06:40:02 59db11863abc systemd[1]: Reached target Final Step.
# Mar 31 06:40:02 59db11863abc systemd[1]: Starting Halt...
# Mar 31 06:40:02 59db11863abc systemd[1]: Shutting down.
# Mar 31 06:40:02 59db11863abc systemd-journald[19]: Journal stopped
#
# Again, there are some errors when systemd tries to make changes that it's
# not allowed to make, but all in all it shuts down cleanly. Do you get a clean shutdown if you follow these steps exactly? |
yes. just tested again, using both self build and remote images from Docker Hub. log stopped at Started Journal Service. By the way, I ended up having to use a debian 8 base image anyway, and what worked for me is to pass --tty in docker run
Welcome to Ubuntu 16.04.4 LTS! Set hostname to <7b7ad8365852>. |
Host is sles 12 sp3. Client: Server: |
This may be due to a bug in older versions of RunC, which prevented Make sure you're running a current version of Docker, which will include a version of RunC that has the fix |
Followed the instruction to test clean shutdown. When I run docker stop systemd, the other terminal basically just quit instantly and I'm not seeing any logs for graceful shutdown.
The text was updated successfully, but these errors were encountered: