Hardcoded workers-bridge subnet (172.30.0.0/16) collides and kills egress when Nexus bootstraps inside a DinD worker #74
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lz/agent-nexus#74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Impact: Total loss of external network connectivity in
nexus-agent-nexus(dev container). Any Claude Code / API / package-install activity inside the container fails. The failure is silent and misleading: DNS keeps resolving, so it does not look like a network-layer problem.Root cause
nexus/src/lib/server/config.ts:When Nexus bootstraps inside a DinD worker that is itself attached to the outer
nexus-workersnetwork (172.30.0.0/16, gw172.30.0.1), the inner daemon creates a bridge with the identical name and subnet. The inner network is created explicitly withSubnet: 172.30.0.0/16(labelnexus-managed=true) — this is not IPAM auto-allocation, so Docker's own pool-collision avoidance never engages.Result inside the container:
172.30.0.1(the outer default gateway) is assigned to the inner bridge and becomes a/32 host LOCALroute. Two competing172.30.0.0/16routes exist (eth0andbr-*), and all gateway-bound traffic is delivered locally. Egress is dead.Observed on
nexus-agent-nexus(inner net created2026-07-16T19:39:12Z):The in-code comment ("Pick a /16 that doesn't collide with existing docker networks. Only consulted on first create.") assumes a human picks a safe value. That assumption breaks under nesting, where the colliding network is the one the bootstrapping container is currently reachable on.
Collateral: an
npm install -g @anthropic-ai/claude-codethat ran during the outage completed "successfully" but silently skipped its platform-native optional dependency, leaving aclaudewrapper with no binary ("native binary not installed"). Anything installing packages during such an outage is at risk of half-installed state.Mitigation applied
Connectivity and Claude Code restored. This will recur on the next nested bootstrap.
Suggested fixes (roughly in order of value)
WORKER_NETWORK) instead of recreating the outer topology.