Open rubycut opened 8 years ago
Thanks for reporting! I guess this may be partly due because the docker service
command are asynchronous, and can return before the actual action is completed.
Does the service eventually work after running those commands?
Also, but just out of interest, wondering why you're removing the service, instead of updating the existing service; doing so would take advantage of the swarm mode scheduler (e.g. taking rolling updates into account)
@thaJeztah , service never starts working unless you add pause in between.
As far as updating existing service, we have fully automated deployment system which injects environment variables into the image. These variables might change between deploys, and therefore we start new service every time.
@thaJeztah Could docker queue service commands and run them one after another by default?
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Physical
Steps to reproduce the issue:
docker service rm web ; docker service create --name web --replicas 3 --publish 3000:3100 --restart-condition any ...
Describe the results you received:
Service is stuck, port is 3000 is no longer working.
Describe the results you expected:
Everything should work as before restart.
Additional information you deem important (e.g. issue happens only occasionally):
If you put 10 seconds pause between
docker service rm
anddocker service create
then everything works as expected.