We are upgrading to Docker 18.06.2.ce (most recent compatible version with Rancher 1.6) and our “inspec” tests have noticed that the out of the box restart behaviour in /usr/lib/systemd/system/docker.service has changed from “Restart=always” to “Restart=on-failure” (seems to change back in later releases).
As part of our install process we are changing back to “Restart=always”; however, when we test this we do not seem to get the behaviour we expect
- Shutdown the docker demon cleanly ( sudo systemctl stop docker i.e. exit code zero ) . The Demon is not restarted and we are expecting it to be with Always
- Docker Demon fails badly (sudo kill -SIGTERM 21972 ). This works and restarts the demon
- Docker Demon time out (sudo kill -SIGSTOP 2208). This seems to do nothing, we expected it to restart the demon after X period of time
There is a lot of documentation on restart policies for docker instances, but we are struggling to find the relevant documentation on how the docker demon should function and how we can test that it does in fact work the way we want.
Any help with this greatly appreciated.
ExecReload=/bin/kill -s HUP $MAINPID