You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix overlay network IP assignment (#55)
* Fix static IP collisions across swarm nodes
Replace the pre-computed containerIndex approach with connect-then-retry:
try the highest free IP, if it conflicts (used on another node invisible
to local NetworkInspect), try the next one down, up to 100 attempts.
Also skip static IP assignment on docker_gwbridge.
* Fix overlay network IP assignment by connecting after container start
When connecting overlay networks to a non-running container, NetworkConnect
succeeds locally but the actual VXLAN handshake is deferred to ContainerStart,
where cross-node IP conflicts cause an unrecoverable timeout. By starting the
container first (on bridge) and then connecting overlay networks one at a time,
the handshake happens immediately during NetworkConnect, making IP conflicts
detectable and retryable.
* Add per-node IP offset and simplify network connect flow
Derive a deterministic IP offset from the swarm node ID so each node
starts at a different position in the high IP range, avoiding cross-node
retry timeouts. Remove splitNetworksByScope and inline attachNetwork.