cli/command/service: preserve mount order on force update - #7227
Merged
Merged
Conversation
Signed-off-by: Kamyar mofakhami <41609894+kawmy@users.noreply.github.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Sep 14, 2026
leonieziechmann
added a commit
to leonieziechmann/betula.app
that referenced
this pull request
Sep 30, 2026
…itch The priority label restarts nothing on the server: its docker (29.8.1 since 2026-09-20) sends swarm the changed label and nothing else, checked 2026-09-30 on the four Folia services (the raw PreviousSpec equals the Spec after the switches of canary and canary-green, every task older than its switch still runs). A CLI before 29.8.0 sorts the mounts on every "service update" (docker/cli#7227): Folia's tmpfs moves to the front, a new task template for swarm, and the web server restarts - seen in a test swarm with 29.3.1. The warning said "swarm is not meant to restart them", which was wrong exactly when it fired; it now names the CLI version and what the restart means for the traffic. The comment also says how to compare the specs: "docker service inspect" fills swarm's defaults into Spec only, so an empty DNSConfig and the rollback's Monitor look new after every update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leonieziechmann
added a commit
to leonieziechmann/betula.app
that referenced
this pull request
Sep 30, 2026
…n switch restarts nothing with the server's docker 29.8.1 (checked on the four Folia services: the raw PreviousSpec equals the Spec after a switch, every task older than its switch still runs); a docker CLI before 29.8.0 sorts the mounts on every `service update` (docker/cli#7227) and so restarts Folia, which 55-switch.sh now says in its comments and in the warning it prints when the tasks change; `docker service inspect` fills swarm's defaults into Spec only, so its PreviousSpec/Spec diff always shows an empty DNSConfig Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leonieziechmann
added a commit
to leonieziechmann/betula.app
that referenced
this pull request
Sep 30, 2026
… switch The priority label restarts nothing with the server's docker (29.8.1, checked 2026-09-30 on the four Folia services). The restart seen in a test swarm with 29.3.1 came from its CLI, which sorts the mounts on every "service update" before 29.8.0 (docker/cli#7227); the "empty DNSConfig" was docker service inspect filling swarm's defaults into Spec only, not a change. The wait after the switch stays: seconds when nothing restarts. master says the same in 55-switch.sh (c8949a6). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Fixed
docker service update --forceso it preserves the existing service mount order when no mount options are supplied.This prevents a subsequent identical
docker stack deployfrom detecting a mount-order difference and unnecessarily rolling the service again.Fixes #7226
- How I did it
Changed
updateService()to callupdateMounts()only when--mount-addor--mount-rmwas explicitly changed.Added a regression test that performs a force-only update and verifies that:
ForceUpdateis incremented.- How to verify it
Run:
The regression test, all service update tests, and the complete service package passed locally in a disposable container environment.
- Human readable description for the release notes