Restart policies

Modified: 22 Nov 2017 17:50 UTC
Stability: Unknown

The way containers are restarted with sdc-docker:

When restarting your container automatically (the cases mentioned above) there is a delay between restarts in order to prevent things from going haywire. sdc-docker uses the same delay frequency as Docker Inc's docker. This means that after exiting but before starting again we delay ((2 ^ RestartCount) * 100) ms. So on the first restart (with RestartCount = 0) we will delay 100ms, then 200, then 400, etc. The amount of delay is not guaranteed. In the case of a CN reboot or in other operational situations a retry may occur sooner.

The main way that this is different from Docker Inc's docker is that with Docker Inc's docker, if you restart the docker daemon all containers will be stopped and those with --restart=always will be started again. With sdc-docker restarting the management systems will not touch your container but restarting the compute node the container lives on will.

If you want your container to always be running you most likely want to specify --restart=always to avoid your containers being stopped when a CN reboots.