You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description #32321
As I mentioned earlier, I do not want to re-create container even though the container is failed,
It would be restarted. But in case of swarm, there is option but it will make new container along to service. What I point out is, If I run docker run command with restart=always option, it will not be re-created new container even though docker daemon is restarted.
However docker service case, it will be re-created container if dockerd is restarted.(I also set task limit as 1, it looks container is only 1 but, it would be newly created.
I wonder how to use previous container which is created at first in case of service creation.
Steps to reproduce the issue:
pre : docker swarm init --task-history-limit 1
Create service
$ docker service create --name test --restart-condition any busybox tail -f /dev/null
2.Check service and container whether it runs or not
This is not possible and is intentionally designed this way.
Swarm tasks are created, they live, they die and that's it.
You can't resurrect them.
Likewise if you kill dockerd, even with live-restore enabled, swarm assumes the worst schedules new containers, if/when the original dockerd process comes back up, the existing containers will be killed and cleaned up.
Description
#32321
As I mentioned earlier, I do not want to re-create container even though the container is failed,
It would be restarted. But in case of swarm, there is option but it will make new container along to service. What I point out is, If I run docker run command with restart=always option, it will not be re-created new container even though docker daemon is restarted.
However docker service case, it will be re-created container if dockerd is restarted.(I also set task limit as 1, it looks container is only 1 but, it would be newly created.
I wonder how to use previous container which is created at first in case of service creation.
Steps to reproduce the issue:
pre : docker swarm init --task-history-limit 1
$ docker service create --name test --restart-condition any busybox tail -f /dev/null
2.Check service and container whether it runs or not
3.Kill dockerd
4.Start dockerd
$ docker run -d --name test1 --restart always busybox tail -f /dev/null
2.Check service and container whether it runs or not
3.Kill dockerd
4.Start dockerd
Describe the results you received:
container is the same after step4
Describe the results you expected:
in case of service, container is newly created
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: