Skip to content

1,2,2

Latest

Choose a tag to compare

@github-actions github-actions released this 12 Feb 16:48
3688107
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.