fix(mesh): reserve lattice .2 in docker IPAM so the sidecar always wins its pin #184

Closed
charles wants to merge 1 commit from fix/lattice-dot2-aux-reservation into main
Owner

On a power-restore cold boot, docker's dynamic IPAM handed lattice .2 (the mesh sidecar's static pin) to whichever float container started first; the sidecar then failed network setup (Address already in use), exited 255, and did not restart — nothing drove mesh reconcile. Both docker-network-create paths now reserve .2 via --aux-address so the dynamic pool starts at .3.

🤖 Generated with Claude Code

On a power-restore cold boot, docker's dynamic IPAM handed lattice .2 (the mesh sidecar's static pin) to whichever float container started first; the sidecar then failed network setup (Address already in use), exited 255, and did not restart — nothing drove mesh reconcile. Both docker-network-create paths now reserve .2 via --aux-address so the dynamic pool starts at .3. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On a power-restore cold boot, docker's dynamic IPAM handed out the lattice
.2 address (the mesh sidecar's static pin) to whichever float container
started first. The sidecar then failed network setup ("Address already in
use"), exited 255, and did NOT restart — so nothing drove mesh reconcile and
the grid could not self-recover.

Both docker-network-create paths now reserve .2 via --aux-address so the
dynamic pool starts at .3, matching nextBridgeMemberIp() in
lattice-bridge-allocator.ts (reserved offsets 0/1/2). The sidecar's explicit
--ip .2 still binds the reserved address.

- bootstrap-from-registry.sh: replace the over-broad .128/25 ip-range with a
  precise .2 aux-address reservation.
- install-coordinator-sidecar.sh: the bare `docker network create
  octet_lattice` fallback (no subnet/reservation at all) now creates with
  subnet + gateway + the .2 aux-address.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012DiF99Lq5PbZAy18JZJsbr
Author
Owner

Superseded by #192. This branch patched only the shell create paths and has gone stale against main (its current diff would revert many since-merged features). #192 fixes the actual gap — the Python runtime network-create paths (_ensure_lattice_bridge / _ensure_macvlan_network) that created the live networks without the .2 reservation. Closing.

Superseded by #192. This branch patched only the shell create paths and has gone stale against main (its current diff would revert many since-merged features). #192 fixes the actual gap — the Python runtime network-create paths (`_ensure_lattice_bridge` / `_ensure_macvlan_network`) that created the live networks without the .2 reservation. Closing.
charles closed this pull request 2026-10-05 20:32:28 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/projectoctet!184
No description provided.