Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

[17.06] sort secrets and configs to ensure idempotence #235

Conversation

thaJeztah
Copy link
Member

Backport of docker/cli#509 for 17.06

docker stack deploy keeps restarting services it doesn't need to (no changes)
because the entries' order gets randomized at some previous (de)serialization.
Maybe it would be worth looking into this at a higher level and ensure
all (de)serialization happens in an ordered collection.

This quick fix sorts secrets and configs (in place, mutably) which ensures the
same order for each run.

Based on
moby/moby#30506

Fixes
moby/moby#34746

(cherry picked from commit 27e8bdf32bbcc49ff3f8201b6da26aba567aa58e)

`docker stack deploy` keeps restarting services it doesn't need to (no changes)
because the entries' order gets randomized at some previous (de)serialization.
Maybe it would be worth looking into this at a higher level and ensure
all (de)serialization happens in an ordered collection.

This quick fix sorts secrets and configs (in place, mutably) which ensures the
same order for each run.

Based on
moby/moby#30506

Fixes
moby/moby#34746

Signed-off-by: Peter Nagy <xificurC@gmail.com>
(cherry picked from commit 27e8bdf32bbcc49ff3f8201b6da26aba567aa58e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah changed the title sort secrets and configs to ensure idempotence [17.06] sort secrets and configs to ensure idempotence Sep 19, 2017
@andrewhsu
Copy link
Contributor

Closing this PR because the docker-ce 17.06 code-line is EoL.

@andrewhsu andrewhsu closed this Nov 7, 2017
@thaJeztah thaJeztah deleted the 17.06-fix-secrets-and-configs-idempotence branch November 7, 2017 22:50
docker-jenkins pushed a commit that referenced this pull request Sep 22, 2018
Merged with https://github.com/seemethere/unir
Upstream-commit: 4d3c344a28c3105f9698ed3ae5213e85188eca97
Component: packaging
docker-jenkins pushed a commit that referenced this pull request May 23, 2019
…drate_when_eating_pretzels

[19.03 backport] Fix error handling for bind mount spec parser.
Upstream-commit: c56df1abf3ec157c959951dd3faa01aeb87bca16
Component: engine
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants