docs(#2363): update network.md + hive-ci.nix for full-DHCP model
- docs/network.md: LOCAL_ADDRESS is now empty (not deterministic-IP); containers use dhcpcd + dnsmasq DHCP pool, not hash-derived static IPs - nix/modules/hive-ci.nix: 'service containers' → 'all containers' in the dnsmasq DHCP pool comment (agents also use the same pool)
This commit is contained in:
parent
4cdbbafc44
commit
2f8c1ec347
2 changed files with 9 additions and 9 deletions
|
|
@ -121,12 +121,12 @@ address arithmetic.
|
|||
### What the Rust side does
|
||||
|
||||
`hive-c0re` reads `HIVE_NETWORK_ISOLATION` and passes
|
||||
`PRIVATE_NETWORK=1`, `LOCAL_ADDRESS=<deterministic-ip>`,
|
||||
`HOST_ADDRESS=<bridge-ip>`, and `HOST_BRIDGE=<bridgeName>` via
|
||||
`lifecycle::set_nspawn_flags` when creating or updating containers. Each
|
||||
agent gets a deterministic IP derived from its name so the address is
|
||||
reproducible across destroy/recreate. This applies uniformly to all
|
||||
containers — no special case.
|
||||
`PRIVATE_NETWORK=1`, `LOCAL_ADDRESS=` (empty), `HOST_ADDRESS=<bridge-ip>`,
|
||||
and `HOST_BRIDGE=<bridgeName>` via `lifecycle::set_nspawn_flags` when
|
||||
creating or updating containers. `LOCAL_ADDRESS` is left empty so the
|
||||
container's dhcpcd acquires an address from the bridge dnsmasq pool
|
||||
(`networking.useDHCP = true` in `harness-base.nix`). This applies uniformly
|
||||
to all containers — agents and service containers alike.
|
||||
|
||||
`HOST_ADDRESS` is the bridge gateway IP (the address part of
|
||||
`HIVE_NETWORK_SUBNET`, via `lifecycle::bridge_gateway_ip` — taken verbatim
|
||||
|
|
|
|||
|
|
@ -410,9 +410,9 @@ in
|
|||
# affect traffic destined for the bridge IP itself.
|
||||
networking.nameservers = [ networkCfg.bridgeIp ];
|
||||
# Bridge-attached via privateNetwork=true + hostBridge. The
|
||||
# gateway's dnsmasq now serves a DHCP pool for service containers
|
||||
# (see dhcp-range in hive-gateway.nix). hive-ci gets its address
|
||||
# from that pool; no static address needed.
|
||||
# gateway's dnsmasq serves a DHCP pool covering all usable bridge
|
||||
# addresses (see dhcp-range in hive-gateway.nix) — agents and
|
||||
# service containers alike receive IPs dynamically.
|
||||
networking.interfaces.eth0.useDHCP = true;
|
||||
|
||||
# nspawn containers can't create user-namespaces, so nix
|
||||
|
|
|
|||
Loading…
Reference in a new issue