feat(lattice): member-IP-refresh loop — keep docker_bridge_ip fresh for floated members #168

Merged
charles merged 1 commit from feat/member-ip-refresh into main 2026-08-31 04:13:18 +00:00
Owner

Task #2 of the dynamic-lattice-IP cutover. Generalizes the proven primary-DB resolver-sync loop to all float-eligible members: resolves each dynamic member live IP via the sidecar resolver (:9110/resolve/) and updates docker_bridge_ip on change, emitting member.ip_changed. Makes config-push bridge_ip mode + mesh URLs follow floated members without any alias-dialing. Leaf roles (ui/metrics/logs/discovery/db) become floatable with just this. Safety: touches ONLY float-eligible roles; pinned members never rewritten. Coordinator-only, leader-gated, inert until OCTET_LATTICE_DYNAMIC_ROLES opts a role in. Tests: 5 pass.

🤖 Generated with Claude Code

Task #2 of the dynamic-lattice-IP cutover. Generalizes the proven primary-DB resolver-sync loop to all float-eligible members: resolves each dynamic member live IP via the sidecar resolver (:9110/resolve/<id>) and updates docker_bridge_ip on change, emitting member.ip_changed. Makes config-push bridge_ip mode + mesh URLs follow floated members without any alias-dialing. Leaf roles (ui/metrics/logs/discovery/db) become floatable with just this. Safety: touches ONLY float-eligible roles; pinned members never rewritten. Coordinator-only, leader-gated, inert until OCTET_LATTICE_DYNAMIC_ROLES opts a role in. Tests: 5 pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Generalizes the primary-DB coordinator-proxy-resolver-sync loop to ALL
float-eligible members. When a role is opted into dynamic lattice IPs
(latticeRoleIsDynamic / OCTET_LATTICE_DYNAMIC_ROLES) its container takes a
Docker-assigned address that changes across recreates; everything that reaches
it by IP (config-push bridge_ip mode, the mesh metrics URL, discovery probes,
heartbeat bridge-IP hints) reads docker_bridge_ip from the DB. This leader-gated
coordinator loop resolves each dynamic member's LIVE IP via the per-host sidecar
resolver (GET :9110/resolve/<id>) and, on change, updates the stored value and
emits member.ip_changed so peer-config bakers (dnsdist/Kea) can re-push.

Once docker_bridge_ip stays fresh, config-push's existing bridge_ip mode dials
the current IP — no alias-dialing needed. Leaf roles (ui/metrics/logs/discovery/
database) become fully floatable with just this loop (their IP-derived URLs are
rebuilt from docker_bridge_ip on the next desired-state pull); the DNS/DHCP plane
additionally needs the member.ip_changed re-push handler (follow-up).

SAFETY: touches ONLY float-eligible roles — pinned client-critical members are
never rewritten, so a transient resolver glitch can't move a pinned IP. Per-member
try/catch tolerates transient unique-constraint collisions (retried next tick).
Coordinator-only, leader-gated, disable with OCTET_MEMBER_IP_REFRESH=0. Inert
until a role is opted into OCTET_LATTICE_DYNAMIC_ROLES.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EPmYfmPxMNCcd47mNUPmH9
charles deleted branch feat/member-ip-refresh 2026-08-31 04:13:19 +00:00
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!168
No description provided.