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
When updating a service with stop-grace-period set to > 1m, swarm starts a second instance after one minute instead of waiting for the first instance to shutdown.
The following service log shows the behaviour:
grace-test_grace.1.utgh2ncsc4d0@linuxkit-025000000001 | 2018/01/25 10:53:54 Starting new server
grace-test_grace.1.utgh2ncsc4d0@linuxkit-025000000001 | 2018/01/25 10:54:03 Signal terminated received, sleeping for 1m30s
grace-test_grace.1.f5puij54d7jj@linuxkit-025000000001 | 2018/01/25 10:55:01 Starting new server
grace-test_grace.1.utgh2ncsc4d0@linuxkit-025000000001 | 2018/01/25 10:55:33 Exit
The service was set to have a 2m grace period and sleeps for 1m30s before it actually exits.
During the overlap docker ps and docker service ls gives the following output:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
063c1791e518 grace-test:local "/gracetest --grace=…" About a minute ago Up 10 seconds grace-test_grace.1.f5puij54d7jjdhczilvicy58q
bd670300df3d grace-test:local "/gracetest --grace=…" About a minute ago Up About a minute grace-test_grace.1.utgh2ncsc4d0targxw53n181f
$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
o8vhn4wan8at grace-test_grace replicated 2/1 grace-test:local
antongocode
changed the title
Unexpected stop-grace-period behaviour during update
Unexpected stop-grace-period behaviour during service update
Jan 25, 2018
Expected: SIGKILL after stop-grace-period, and expected next container to start after first terminates (soon after SIGKILL).
Actual: SIGKILL is sent and new container starts around the same time, regardless if first container has terminated completely.
Any workaround I can think of right now involves some sort of 'lock' and feels bad... really appreciate if someone can validate this bug and/or suggest workarounds
When updating a service with
stop-grace-period
set to > 1m, swarm starts a second instance after one minute instead of waiting for the first instance to shutdown.The following service log shows the behaviour:
The service was set to have a 2m grace period and sleeps for 1m30s before it actually exits.
During the overlap
docker ps
anddocker service ls
gives the following output:Steps to reproduce the issue:
I've created a repo to reproduce the issue.
Describe the results you received:
Number of service instance greater than one during service update.
Describe the results you expected:
Docker should wait for running instance to exit before starting a new instance.
Output of
docker version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: