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

[17.09] sort secrets and configs to ensure idempotence #236

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Sep 19, 2017

Backport of docker/cli#509 for 17.09

From the original upstream PR:

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 docker/cli@27e8bdf)

`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>
Copy link
Contributor

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andrewhsu andrewhsu added this to the 17.09.0 milestone Sep 20, 2017
@vieux
Copy link
Contributor

vieux commented Sep 21, 2017

LGTM

@vieux vieux merged commit 508a263 into docker-archive:17.09 Sep 21, 2017
@thaJeztah thaJeztah deleted the 17.09-fix-secrets-and-configs-idempotence branch September 21, 2017 07:15
docker-jenkins pushed a commit that referenced this pull request Sep 24, 2018
Bump debian epoch to 5
Upstream-commit: 312ea61
Component: packaging
docker-jenkins pushed a commit that referenced this pull request Jun 18, 2019
…w_im_hungry

[18.09 backport] Fix error handling for bind mount spec parser.
Upstream-commit: 41fbd152739faa225db8c9913e34c663b9202101
Component: engine
silvin-lubecki pushed a commit to silvin-lubecki/docker-ce that referenced this pull request Jan 29, 2020
…s-and-configs-idempotence

[17.09] sort secrets and configs to ensure idempotence
akrasnov-drv pushed a commit to drivenets/docker-ce that referenced this pull request Apr 23, 2023
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.

3 participants