docs(swarm): correct manager address rebinding - #305
Merged
Conversation
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.
The multi-node guide said that rebinding an existing manager onto the private network means
docker swarm init --force-new-cluster.That command rebinds the data plane address but leaves the control plane address untouched, because it restores raft from the existing snapshot and the manager's own address is part of that snapshot.
Restarting the Docker daemon does not move it either.
This matters because a worker does not keep the address it joined on.
It replaces its stored remote with whatever the manager advertises, and libnetwork seeds the overlay's gossip cluster from that list on port 7946.
A manager advertising a public address therefore breaks the overlay on every worker, whichever address the worker was joined with.
It fails quietly, because the dispatcher session stays up on the address the worker originally dialled, so
docker node lsreports the node ready while no gossip ever reaches it.The guide now describes the two addresses separately, states that changing the control plane address needs a genuine reinitialisation, and adds a subsection on preserving secrets across one.
Production secrets are external, so the raft store is their only home and
docker secret inspectdoes not return values.Registry credentials have the same problem, since swarm embeds them into the service spec at deploy time rather than storing them centrally.
Verification guidance now covers the manager's control plane address and a cross-node
tasks.lookup, because neither address reading on its own proves the overlay works.