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