New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: update out of sequence with docker stack deploy #39891
Comments
I am also getting this sporadically in AWS. Though normally a redeploy fixes it. However, today (well the last 3 days) it hasn't been working. So what I've done was just delete the stack and recreate it, though I would rather know why and avoid this if possible. |
+1 |
1 similar comment
+1 |
Out of sequence happens when the incorrect sequence number is used to update a swarm object.
|
+1 |
That would be strange if you're the only one doing a |
If I'm not mistaken, some state changes (e.g. status |
I have the same problem when deploying multiple stack at the same time. So the build pipeline finishes multiple projects/services and deploys their stack on a single node Docker Swarm. Related output from Gitlab Pipeline with Ansible: STDOUT:
Updating service mystack_media_cron (id: rlrglli46i0fmdspcgk9rx3ge)
Updating service mystack_media_db (id: 15bjupmo3d829k9owhz7ig6r5)
Updating service mystack_media_horizon (id: v0gw27bwh0eb9guodh2pxj4rl)
Updating service mystack_x-cli-healthcheck (id: i4p16j901pes746mpnlq2r83b)
STDERR:
failed to update service mystack_x-cli-healthcheck: Error response from daemon: rpc error: code = Unknown desc = update out of sequence
MSG:
non-zero return code My executed command with Ansible at this time: docker stack deploy -c <(docker-compose --env-file './media.env' -f './media.yml' config) --with-registry-auth mystack; |
If I understand your comment correctly, and those multiple deploys act on the same stack/services, then that may be a race condition between them (and expected behaviour for the error); what would happen in that case is;
In the above, both job 1 and 2 try to update the service from "version=1", but one of them will already have sent the updated definition, at which point the swarm manager will reject it (because now "version=1" is no longer the current version). |
Description
docker stack deploy
command sporadically fails withupdate out of sequence
error.Steps to reproduce the issue:
The issue started to occur after I added a few services that aren't replicated initially, like this:
These services are then executed by https://github.com/crazy-max/swarm-cronjob on 5 and 10 minutes intervals. I suspect the issue might occur when a service is launched and the
stack deploy
happens at the same time.I use several single-node swarm installations. The issue randomly occurs on any 1-3 out of 12 nodes.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Bare metal. Lenovo TS150.
Related to #30794.
The text was updated successfully, but these errors were encountered: